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: 
`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
I'd use withDate()

```
private static final DateTimeFormatter FORMATTER = DateTimeFormat.forPattern("HH:mm");
@Test
public void test() {
    DateTime dateTime = FORMATTER.parseDateTime("05:40");
    DateTime now = new DateTime();
    dateTime = dateTime.withDate(now.getYear(), now.getMonthOfYear(), now.getDayOfMonth());
    System.out.println(dateTime.toDate());
}

```