Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

New date helper functions #88

Merged
merged 17 commits into from
Jun 19, 2021
Merged

New date helper functions #88

merged 17 commits into from
Jun 19, 2021

Conversation

bpuig
Copy link
Owner

@bpuig bpuig commented Jun 19, 2021

Change getTotalDurationInDays, getDaysUntilEnds, getDaysUntilTrialEnds, getRemainingPeriodProportion for more flexible methods.

Breaking changes

getDaysUntilTrialEnds is now getTrialPeriodRemainingUsageIn('day')
getTotalDurationInDays is now getSubscriptionTotalDurationIn('day')
getDaysUntilEnds is now getSubscriptionPeriodRemainingUsageIn('day')
getRemainingPeriodProportion is now getRemainingSubscriptionPeriodProportion()
getRemainingPriceProrate is now getSubscriptionRemainingUsagePriceProrate()

TODO

  • Helper to calculate periods and diffs
  • Trial period functions
  • Subscription period functions
  • Duplicate trial data on subscription
    • Create own trait for getTrialTotalDurationIn

@bpuig bpuig added enhancement New feature or request work in progress This work is in progress. labels Jun 19, 2021
@bpuig bpuig added this to the v5.0.0 milestone Jun 19, 2021
@bpuig
Copy link
Owner Author

bpuig commented Jun 19, 2021

This gives flexibility to period calculation and comparison and also solves @boryn question #77 (comment) about copying trial values into subscription

@bpuig bpuig merged commit 7d73dba into main Jun 19, 2021
@bpuig bpuig deleted the new_date_functions branch June 19, 2021 12:42
@bpuig bpuig removed the work in progress This work is in progress. label Oct 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant