Skip to content

Commit

Permalink
Fix date calculation (again) (#2624)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
My math was all over the place. This makes it so that there's only one
day in year day and months don't start on the second. In my defense it's
kinda hard to test this.

## Why It's Good For The Game
Time consistency

## Changelog

:cl:
fix: IC/sector months now actually start on the first and there's only
one year day
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
MarkSuckerberg authored Jan 4, 2024
1 parent bd34849 commit 2183eed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/__HELPERS/time.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
//International Fixed Calendar format (https://en.wikipedia.org/wiki/International_Fixed_Calendar)
var/days_since = round(realtime / (24 HOURS))
var/year = round(days_since / 365) + 481
var/day_of_year = days_since % 365 + 1
var/day_of_year = days_since % 365
var/month = round(day_of_year / 28)
var/day_of_month = day_of_year % 28 + 1

Expand Down

0 comments on commit 2183eed

Please sign in to comment.