Skip to content
Snippets Groups Projects

mo_datetime: better conversion from string

Merged Sebastian Müller requested to merge datetime_partial_string_fix into main
1 unresolved thread
  • better conversion from string
  • allow 'T' as time separator
  • allow missing entries (e.g. no second given)

Merge request reports

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
247 247 ! date with time has higher julian day fraction
248 248 @assertTrue(julian >= julian2)
249 249
250 ! partial datetime init from string
251 @assertTrue(datetime("1992-10-8 15:15:42") == datetime("1992-10-08T15:15:42"))
252 @assertTrue(datetime("1992-10-08 15:15:00") == datetime("1992-10-08 15:15"))
253 @assertTrue(datetime("1992-10-08 15:00:00") == datetime("1992-10-08 15"))
254 @assertTrue(datetime("1992-10-08T00:00:00") == datetime("1992-10-08"))
255 @assertTrue(datetime("1992-10-08T00:00:00") == datetime("1992-10-08"))
  • Nice work! Simple but for all reasonable inputs that come to my mind.

  • Sebastian Müller requested review from @kaluza

    requested review from @kaluza

  • added 1 commit

    Compare with previous version

  • Sebastian Müller approved this merge request

    approved this merge request

  • Maren Kaluza approved this merge request

    approved this merge request

  • mentioned in commit 25c80d0c

  • Please register or sign in to reply
    Loading