Skip to content

Commit b8807cf

Browse files
Add some Unitful unit names that were missing
There's a couple of differences between the naming of units in `Unitful` and this package that makes it not quite a direct swap when changing between the two packages. This adds a couple of aliases for current units as well as a new `wk`.
1 parent aa3ea7c commit b8807cf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/units.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,21 @@ end
158158
# Common assorted units
159159
## Time
160160
@register_unit min 60 * s
161+
@register_unit minute min
161162
@register_unit h 60 * min
162163
@register_unit hr h
163164
@register_unit day 24 * h
165+
@register_unit d day
166+
@register_unit wk 7 * day
164167
@register_unit yr 365.25 * day
165168

166169
@add_prefixes min ()
170+
@add_prefixes minute ()
167171
@add_prefixes h ()
168172
@add_prefixes hr ()
169173
@add_prefixes day ()
174+
@add_prefixes d ()
175+
@add_prefixes wk ()
170176
@add_prefixes yr (k, M, G)
171177

172178
## Volume

0 commit comments

Comments
 (0)