How to create format item from Japanese datetime string? #557
Replies: 2 comments
-
While I understand that Japan does this (and a few other countries I believe), this is simply not possible to handle. Days only have 24 hours in them, so anything beyond that must be rejected as invalid. Even without that, there is no year present in the formatted value, so the date could not be parsed. |
Beta Was this translation helpful? Give feedback.
-
@thelastfantasy I have written some data mangling and visualization code for Japanese TV show data. The simplest sensible thing I found to work is to write a parser of the time part myself, and convert that to seconds from start of the date indicated by the date part. Then you can add the seconds to get a datetime, or whatever. In my case, it was easier just to keep stuff in seconds, and use datetimes objects as "date anchors" the seconds were relative to. Then, implement a display routine for the time part from seconds to string for output. |
Beta Was this translation helpful? Give feedback.
-
Just like this
I have 2 problems in this code:
This is the full Japanese weekday list from Sunday to Saturday.
Full format: "日曜日", "月曜日", "火曜日", "水曜日", "木曜日", "金曜日", "土曜日"
The short: "日", "月", "火", "水", "木", "金", "土"
Beta Was this translation helpful? Give feedback.
All reactions