mirror of
https://github.com/ourongxing/newsnow.git
synced 2025-01-19 03:09:14 +08:00
chore: test parseRelativeDate in cloudflare
This commit is contained in:
parent
1011aa0581
commit
164735ef18
@ -212,6 +212,8 @@ export function parseRelativeDate(date: string, timezone: string = "UTC") {
|
||||
for (const w of words) {
|
||||
const wordMatches = w.regExp.exec(theDate)
|
||||
if (wordMatches) {
|
||||
console.log(offset)
|
||||
console.log(w.startAt.format("YYYY-MM-DD"))
|
||||
console.log(`${w.startAt.add(offset).format("YYYY-MM-DD")}`)
|
||||
// The default parser of dayjs() can parse '8:00 pm' but not '8:00pm'
|
||||
// so we need to insert a space in between
|
||||
|
Loading…
x
Reference in New Issue
Block a user