Read the unit of a singular possessive duration like "a month's time"

This commit is contained in:
dualfroz committed 2026-10-03 13:10:48 +02:00
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]