More > JRiver Media Center 30 for Windows
MC 30 Feature Requests
zybex:
Ah nice, I missed that (or forgot).
zybex:
Expression function request: an extra mode to ConvertDate() that takes a knows date format, independent from the user's system format.
ConvertDate(datetime_string, mode=0) - current behaviour, default mode 0
ConvertDate(ISO8601_date, mode=1) - new mode, string as known date format with optional time:
YYYY-MM-dd
YYYY-MM-dd HH:mm
YYYY-MM-dd HH:mm:ss
(4 digits for year, 1 or 2 digits for others, 24h clock)
Not exactly ISO8601, but easy. This allows writing code what works regardless of the user's location.
Alternatively: ConvertDate(year, month, day, hour, min, sec)
Matt:
--- Quote from: zybex on February 01, 2023, 11:15:24 am ---Alternatively: ConvertDate(year, month, day, hour, min, sec)
--- End quote ---
ConvertDate already takes open formats, so how about ConvertDateBroken? I can add that today.
zybex:
ConvertDate() is ambiguous, we don't know how 04/05/2023 will be interpreted for another user. Is that dd/mm or mm/dd?
I think it's better to add a mode instead of a new function. It doesn't break any existing code (default=0) and just adds a flag saying to interpret the value as a known format. Also, converDateBroken doesn't inspire much confidence :)
Matt:
Sounds good.
Next build:
NEW: Added a the ability to pass a year, month, day, hour, minute, and second to the ConvertDate expression function.
Cheers.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version