mirror of
https://github.com/mitb-archive/filebot
synced 2025-03-09 13:59:49 -04:00
Fix dateutil methods in case groovy extension methods dont work
This commit is contained in:
parent
1710681ff6
commit
a7c736d40b
@ -573,18 +573,18 @@ public class ExpressionFormatMethods {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String format(Temporal self, String pattern) {
|
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) {
|
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) {
|
public static String format(Date self, String format) {
|
||||||
return new SimpleDateFormat(format).format(self);
|
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);
|
return new SimpleDateFormat(format).parse(self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user