Add faker.currency and faker.date modules - #11
Open
imitelis wants to merge 1 commit into
Open
Conversation
Author
|
@paraseba Hi! Added two new faker modules (currency and date) following the existing patterns in the repo. Would appreciate a review when you get a chance. Thanks! |
Modeled after the Ruby Faker gem's Currency and Date modules. New modules following the existing data/API separation pattern: - faker.currency: ISO 4217 data (160+ currencies), code/currency-name/currency-symbol/currency/amount - faker.date: month/day names, past/future-date/between with unit selection and optional anchor Instant, between-except, birthday with age range, in-date-period, on-day-of-week-between, date-string formatting, timestamp, date-of relative dates All .cljc for cross-platform compatibility. Includes tests (67 assertions, 0 failures).
imitelis
force-pushed
the
add-currency-date
branch
from
July 26, 2026 18:54
c05bdcf to
ff610b4
Compare
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.
Summary
Adds 2 new faker modules, modeled after the Ruby Faker gem's
CurrencyandDatemodules. Follows the existing data/API separation pattern (.cljc, cross-platform).faker.currency
ISO 4217 data (160+ currencies):
code,currency-name,currency-symbol,currency(map),amountfaker.date
month/month-abbr/day-of-week/day-of-week-abbr— calendar namespast/future-date— with unit selection (:days,:hours, etc.) and optional anchor Instantbetween/between-except— Instant range, with optional exclusion datebirthday— age-range constrained LocalDatein-date-period— random date within a specific month/yearon-day-of-week-between— constrain to specific weekdays (single day or vector)date-string— formatted output with pattern stringstimestamp— Unix epoch secondsdate-of— relative dates (:today,:yesterday,:tomorrow)Tests
All tests pass: 8 tests, 67 assertions, 0 failures.
Files
src/faker/currency.cljc,src/faker/currency_data.cljcsrc/faker/date.cljc,src/faker/date_data.cljctest/faker/core_test.clj