Skip to content

Optimize date component calculation#4

Open
ejensen wants to merge 2 commits intotoddkramer:masterfrom
Frameio:optimize-date-components
Open

Optimize date component calculation#4
ejensen wants to merge 2 commits intotoddkramer:masterfrom
Frameio:optimize-date-components

Conversation

@ejensen
Copy link
Copy Markdown

@ejensen ejensen commented Feb 27, 2022

Before this change, the date components were being calculated on each if / else if condition. This change removes the redundant calculation by making a local copy of the components before the if / else if conditions are reached.

This change also adds the option to specify the reference date, rather than limiting the reference date to now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant