Companion
object Companion
Functions
Link copied to clipboard
true when two ISO-8601 periods describe the same duration even if written differently ("P1Y" vs "P12M", "P1W" vs "P7D").
Link copied to clipboard
Parses an ISO-8601 duration string into a BillingPeriod.
Link copied to clipboard
Price in micros normalized to one average month.
Link copied to clipboard
Price in micros normalized to one week.
Link copied to clipboard
fun savingsPercent(baseMicros: Long, basePeriod: String?, comparedMicros: Long, comparedPeriod: String?): Int
Percentage saved by paying comparedMicros per comparedPeriod instead of baseMicros per basePeriod, normalized to a common cadence.
Link copied to clipboard
Total days for a raw ISO-8601 period, or 0 when unparseable.
Link copied to clipboard
Total months for a raw ISO-8601 period, or 0.0 when unparseable. Convenience for Java callers that only need the normalization factor.