Read the unit of a singular possessive duration like "a month's time"
This commit is contained in:
1 parent
548a58524d
commit
b0c21b9e23
2 files changed
+10
-1
No files matched your search
@@ -32,7 +32,8 @@ const halfUnits = {
|
||||
|
||||
const parseUnit = function (m) {
|
||||
let unit = m.match('#Duration').text('normal')
|
||||
unit = unit.replace(/s$/, '')
|
||||
// 'weeks', or "a month's time"
|
||||
unit = unit.replace(/'?s$/, '')
|
||||
// support shorthands like 'min'
|
||||
if (Object.hasOwn(aliases, unit)) {
|
||||
unit = aliases[unit]
|
||||
|
||||
Reference in new issue
Block a user