Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
before() {
this.d = spacetime.now() // ???
return this
}
// 'after 2019'
const parseTime = function(doc) {
let time = doc.match('(at|by|for|before)? #Time+')
if (time.found) {
doc.remove(time)
}
// get the main part of the time
time = time.not('(at|by|for|before|sharp)')
time = time.not('on the dot')
let s = spacetime.now()
let now = s.clone()
// '5 oclock'
let m = time.match('^#Cardinal oclock (am|pm)?')
if (m.found) {
m = m.not('oclock')
s = s.hour(m.text('reduced'))
if (s.isValid() && !s.isEqual(now)) {
return s.time()
}
}
// 'quarter to two'
m = time.match('(half|quarter|25|15|10|5) (past|after|to) #Cardinal')
if (m.found) {
s = halfPast(m, s)
static async getInitialProps() {
const translations = await getTranslation('pt', 'common')
const now = spacetime().hour()
const greeting = await goot(now)
return { greeting, translations }
}
static async getInitialProps() {
const translations = await getTranslation('pt', 'common')
const now = spacetime().hour()
const greeting = await goot(now)
return { greeting, translations }
}