1
0
mirror of https://github.com/mitb-archive/filebot synced 2025-03-09 05:51:31 -04:00

Fix dateutil methods in case groovy extension methods dont work

This commit is contained in:
Reinhard Pointner 2018-12-03 03:23:37 +07:00
parent 1710681ff6
commit a7c736d40b

View File

@ -573,18 +573,18 @@ public class ExpressionFormatMethods {
}
public static String format(Temporal self, String pattern) {
return DateTimeFormatter.ofPattern(pattern, Locale.ENGLISH).format(self);
return DateTimeFormatter.ofPattern(pattern).format(self);
}
public static String format(TemporalAmount self, String pattern) {
return DateTimeFormatter.ofPattern(pattern, Locale.ENGLISH).format(LocalTime.MIDNIGHT.plus(self));
return DateTimeFormatter.ofPattern(pattern).format(LocalTime.MIDNIGHT.plus(self));
}
public static String format(Date self, String format) {
return new SimpleDateFormat(format).format(self);
}
public static Date toDate(String self, String format) throws ParseException {
public static Date parseDate(String self, String format) throws ParseException {
return new SimpleDateFormat(format).parse(self);
}