Class FileNameDateTimeParser

java.lang.Object
com.sk89q.worldedit.util.time.FileNameDateTimeParser
All Implemented Interfaces:
SnapshotDateTimeParser

public class FileNameDateTimeParser extends Object implements SnapshotDateTimeParser
Parses date-times by looking at the file name. File names without a time will use 00:00:00.

Elements may be separated by a space, dash, or colon. The date and time may additionally be separated by a 'T'. Only the year must have all digits, others may omit padding zeroes.

Valid file name examples:

  • 2019-06-15
  • 2019-06-15 10:20:30
  • 2019-06-15 10:20:30
  • 2019-06-15T10:20:30
  • 2019 06 15 10 20 30
  • 2019-06-15-10-20-30
  • 2019-6-1-1-2-3