Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New command: !kerbals #38

Open
KeeperOfMaps opened this issue Apr 17, 2023 · 1 comment
Open

New command: !kerbals #38

KeeperOfMaps opened this issue Apr 17, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@KeeperOfMaps
Copy link
Contributor

!kerbals <number of days|months|years>|<date>

Returns the number of kerbal equivalent to the number of days/months/years or since/until the date.

Considerations: Needs to calculate the value of a kerbal each time as it is a continuously changing constant.

@KeeperOfMaps KeeperOfMaps added the enhancement New feature or request label Apr 17, 2023
@TheRealFakeAdmin
Copy link
Member

TheRealFakeAdmin commented Apr 28, 2023

Comments

  • 1 Mean Gregorian Calendar Year === (365+1/4-1/100+1/400) days === 365.2425 days [1]

  • Months would mess this thing up, since they are not as cleanly calculated. I'll see if there are any pre-made packages/scripts that do this for me. Though if it comes to it, I may be able to come up with my own system.

Code Examples

const yr = (new Date()).getFullYear();
(yr % 4 === 0) && (yr % 100 !== 0) || (yr % 400 === 0); // is Leap Year

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants