colinsheppard / time

A NetLogo extension that brings date/time utilities and discrete event scheduling to NetLogo
12 stars 13 forks source link

weird behavior for time:show #65

Open manentai opened 6 months ago

manentai commented 6 months ago
extensions [time]

globals [ my-time ]

to setup
  ca
  reset-ticks
  set my-time time:create-with-format "01-01-2023" "dd-MM-YYYY"
  print my-time

  print time:show my-time "dd-MM-YYYY"

  tick

  set my-time time:plus my-time 15 "days"
  print time:show my-time "dd-MM-YYYY"
end

output is

observer> setup
{{time:logotime 01-01-2023}}
01-01-2022
16-01-2023

the year is wrong in the first time:show