]> gitweb.factorcode.org Git - factor.git/commit
calendar: change the behavior of 1 months time+
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 10 Feb 2022 22:11:49 +0000 (14:11 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 10 Feb 2022 22:11:49 +0000 (14:11 -0800)
commitbe11e17f5cffd44882526f9bdd9c5b76dd7fb20a
treed9651892d59e4b53b18a4234fe67e4e448631c80
parent867b9f58b45df6309ae6cdcdf6fc395400a8ceb3
calendar: change the behavior of 1 months time+

Before, it would create an invalid date:

  IN: scratchpad 2021 1 30 <date> 1 months time+ .
  T{ timestamp
      { year 2021 }
      { month 2 }
      { day 30 }
      { gmt-offset T{ duration { hour -6 } } }
  }

After, it sets it to the last day of the month:

  IN: scratchpad 2021 1 30 <date> 1 months time+ .
  T{ timestamp
      { year 2021 }
      { month 2 }
      { day 28 }
      { gmt-offset T{ duration { hour -8 } } }
  }
basis/calendar/calendar-tests.factor
basis/calendar/calendar.factor