Repository navigation
Separate instants from civil dates and add WAX-0034 Monetary Values and Currency - #25
Open
RobGrafrath wants to merge 2 commits into
Open
RobGrafrath wants to merge 2 commits into
RobGrafrath wants to merge 2 commits into
Conversation
WAX-0012 now stores instants in UTC and civil dates as plain dates, and requires a zone of reference whenever the two meet. Each organization gets a business zone. WAX-0001 defines occurred_at as asserted by the actor or source and recorded_at as assigned by the store, and names the business date fields. WAX-0027 and WAX-0028 record how a due time or a recurrence was counted and in which zone. WAX-0012 moves to 2.0 because its Decision text changes. WAX-0001, WAX-0019, WAX-0027, and WAX-0028 move to 1.1. INDEX.md follows the new WAX-0012 sentence. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Rob Grafrath <rob@openarcollective.org>
Every monetary value becomes an exact decimal amount plus an ISO 4217 currency code. An installation whose Region Packs name one currency gets that currency as its default, applied automatically and stamped on every stored value, so single-currency installations never specify one. OpenAR code and certified modules always specify the currency in code and never rely on the default, and continuous integration runs in a configuration with more than one currency to enforce it. WAX-0001, WAX-0022, WAX-0023, and WAX-0007 reference the new decision. WAX-0007 now marks the Region Pack and Language Pack tiers as one or more. WAX-0034 enters as Proposed 0.1. README.md counts 53 decisions. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Rob Grafrath <rob@openarcollective.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes and why
A review of the record for assumptions that hold only in one currency and one time zone found two gaps in the Wax foundation. This pull request closes both before any code or event exists, when the fix costs nothing.
Dates. WAX-0012 said all date and time values are stored in UTC. That is right for moments but wrong for calendar dates such as a due date or a date of birth, which name a day and have no zone. The record already uses day-valued fields (HIVE-0001, HIVE-0003, HIVE-0005, and the date type in WAX-0022), and HIVE-0008's statement run takes a through date without saying which midnight it means. The first commit separates instants from civil dates, gives each organization a business zone, gives occurred_at and recorded_at precise meanings, names the business date fields, and makes due times and recurring jobs record how they were counted and in which zone.
Money. Amounts were bare numbers (the worked example in WAX-0001), and currency was defined once per installation (WAX-0007). The second commit adds WAX-0034 Monetary Values and Currency. Every monetary value becomes an exact decimal amount plus an ISO 4217 code. An installation whose Region Packs name one currency gets that currency as its default, applied automatically and stamped on every stored value, so single-currency installations never specify a currency. OpenAR code and certified modules always specify the currency in code and never rely on the default, and continuous integration runs in a configuration with more than one currency to enforce it.
Decisions the maintainer made for this change
Defaults chosen for review
These were recommended and are not yet explicitly confirmed, so they are the first things to check.
Interacting decisions
WAX-0001, WAX-0007, WAX-0012, WAX-0013, WAX-0019, WAX-0022, WAX-0023, WAX-0026, WAX-0027, WAX-0028, and SHARED-0007 for the continuous integration baseline. No decision is contradicted. Follow-on edits to HIVE-0005, HIVE-0006, HIVE-0007, HIVE-0008, SHARED-0006, and MOD-PURCHASE-0001 (an account's denomination currency, civil posting dates, per-currency control totals) build on this change and are deliberately not included.
If this touches decisions/wax/
Version bumps
Checklist
python3 scripts/validate.py --base mainpasses locally, or I am relying on CI to tell me.🤖 Generated with Claude Code