Question: I have to parse dates in formats:

```
HH:mm 
dd MMM 
dd MMM yyyy

```

I've managed to handle the last two of them:

```
val dateParsers = Array(
    DateTimeFormat.forPattern("dd MMM").getParser,
    DateTimeFormat.forPattern("dd MMM yyyy").getParser,
    ISODateTimeFormat.timeParser().getParser
)

val formatter = new DateTimeFormatterBuilder().append(null, dateParsers).toFormatter.withZoneUTC
DateTime.parse(updatedString, formatter.withDefaultYear(currentYear).withLocale(ruLocale))

```

Everything is ok with `dd MMM` and `dd MMM yyyy`, but when I'm trying parse time like `05:40` I'm getting `01-01-1970` date instead of today's date. What is the simplest method to set default date as today's date in parser?

Answer: 
Joda-Time-Formatter only supports `withDefaultYear()`, not things like `withDefaultDate()`. Instead you can do this:

```
DateTimeFormatter timeParser = DateTimeFormat.forPattern("HH:mm");
LocalTime time = timeParser.parseLocalTime("05:40");
DateTimeZone tz = DateTimeZone.getDefault(); // Or DateTimeZone.UTC or DateTimeZone.forID( "Europe/Paris" )
LocalDate today = LocalDate.now(tz);
DateTime moment = today.toLocalDateTime(time).toDateTime(tz);
System.out.println(moment);
// output in my local timezone: 2014-08-20T05:40:00.000+02:00

```

Note: I have written the solution in Java, because I am not a scala-guy.
`Date` and `Time` are completely different, without subclassing `DateTimeFormatter` and implementing your special "time at todays' date"-algorithm you wont get very far. Either subclass or maybe inject your current date into the string if it matches some regular expression