Skip to content

Handle years less than 100. (Y2k bug) #55

Description

@jbaber

From the example,

  new Timesheet('timesheet', 100, 105, [
    ['103', 'Had very bad luck'],
    ['10/103', '106', 'At least had fun', 'dolor'],
    ['02/105', '05/106', 'Enjoyed those times as well', 'ipsum'],
    ['07/105', '09/105', 'Bad luck again', 'default'],
    ['10/105', '108', 'For a long time nothing happened', 'dolor'],
    ['01/108', '05/109', 'LOST Season #4', 'lorem'],
    ['01/109', '05/109', 'LOST Season #4', 'lorem'],
    ['02/110', '05/110', 'LOST Season #5', 'lorem'],
    ['09/108', '06/110', 'FRINGE #1 & #2', 'ipsum']
  ]);

works fine, but

  new Timesheet('timesheet', 50, 55, [
    ['53', 'Had very bad luck'],
    ['10/53', '56', 'At least had fun', 'dolor'],
    ['02/55', '05/56', 'Enjoyed those times as well', 'ipsum'],
    ['07/55', '09/55', 'Bad luck again', 'default'],
    ['10/55', '58', 'For a long time nothing happened', 'dolor'],
    ['01/58', '05/59', 'LOST Season #4', 'lorem'],
    ['01/59', '05/59', 'LOST Season #4', 'lorem'],
    ['02/60', '05/60', 'LOST Season #5', 'lorem'],
    ['09/58', '06/60', 'FRINGE #1 & #2', 'ipsum']
  ]);

yields a blank timeline with correct years marked.

Activity

  1. jbaber commented on Sep 16, 2021

    @jbaber
    Author

    I see from the code it's because it's actually interpreting '53' as '1953'.

  2. changed the title [-]Handle years less than 100.[/-] [+]Handle years less than 100. (Y2k bug)[/+] on Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions