Win10 Version - Date.Parse broken

All your suggestions, requests and ideas for future development
Post Reply
longski96
Posts: 4
Joined: 24 Apr 2018, 03:21

Win10 Version - Date.Parse broken

Post by longski96 »

Recently I reinstalled Win10 and bought the FileBot version from the Windows store, primarily due to its awesome Photo/Video renaming ability (I really think this should not be hidden anymore).

Initially this worked great. Then, all of a sudden Date.Parse has stopped working, breaking most of my scripts.

E.g.

Script subset:

Code: Select all

{Date.parse('dd-MM-yyyy', '19-08-2018')}
Error:

Code: Select all

Expression yields empty value: No signature of method: static java.util.Date.parse() is applicable for argument types: (String, String) values: [dd-MM-yyyy, 19-08-2018]
Possible solutions: parse(java.lang.String), wait(), clone(), grep(), any(), use(java.util.List, groovy.lang.Closure)
--

To me this looks like Date.parse(string one, sting two) is no longer in the Java API.

Filebot appears to be a Desktop Bridge app with an embedded version of Java, so I do not know why this would happen. Any ideas?

I've tried - reinstalling Filebot, deleting all AppData/ProgramData dirs, Installing full Java from the Web (not that this should be required), uninstalling it using Java's tool.
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Win10 Version - Date.Parse broken

Post by rednoah »

Looks like the Groovy runtime changed in a few strange places in backwards-incompatible ways... I'll fix this use case for the next version.

In the meanwhile, you can use this:

Code: Select all

new java.text.SimpleDateFormat('dd-MM-yyyy').parse('19-08-2018')
:idea: Please read the FAQ and How to Request Help.
longski96
Posts: 4
Joined: 24 Apr 2018, 03:21

Re: Win10 Version - Date.Parse broken

Post by longski96 »

Thanks, worked great for getting the real date from Timer videos:

Code: Select all

{new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ").parse(media.comapplequicktimecreationdate)}
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Win10 Version - Date.Parse broken

Post by rednoah »

Do you mind sending me a sample file? I might be able to add some built-in bindings for this use case in future versions.
:idea: Please read the FAQ and How to Request Help.
Post Reply