Skip to content

Add wk unit for weeks #82

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

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
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
4 changes: 3 additions & 1 deletion src/units.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ end
kg,
)
@doc(
"Time in seconds. Available variants: `fs`, `ps`, `ns`, `μs` (/`us`), `ms`, `min`, `h` (/`hr`), `day`, `yr`, `kyr`, `Myr`, `Gyr`.",
"Time in seconds. Available variants: `fs`, `ps`, `ns`, `μs` (/`us`), `ms`, `min`, `h` (/`hr`), `day`, `wk`, `yr`, `kyr`, `Myr`, `Gyr`.",
s,
)
@doc(
Expand Down Expand Up @@ -161,12 +161,14 @@ end
@register_unit h 60 * min
@register_unit hr h
@register_unit day 24 * h
@register_unit wk 7 * day
@register_unit yr 365.25 * day

@add_prefixes min ()
@add_prefixes h ()
@add_prefixes hr ()
@add_prefixes day ()
@add_prefixes wk ()
@add_prefixes yr (k, M, G)

## Volume
Expand Down