Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for date-parser exercise #492

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add task 5 functions
  • Loading branch information
bobbicodes committed Jun 7, 2022
commit fa29082c167b0a26c328f2c94762e885e2d0ba0b
9 changes: 9 additions & 0 deletions exercises/concept/date-parser/.meta/exemplar.clj
Original file line number Diff line number Diff line change
@@ -56,3 +56,12 @@
:month-name (.group matcher "month")
:day (.group matcher "day")
:year (.group matcher "year")})))

(def match-numeric-date
(re-pattern (str "(?<day>" day ")/(?<month>" month ")/(?<year>" year ")")))

(def match-month-name-date
(re-pattern (str "(?<month>" months ") (?<day>" day "), (?<year>" year ")")))

(def match-day-month-name-date
(re-pattern (str "(?<dayname>" days "), (?<month>" months ") (?<day>" day "), (?<year>" year ")")))