const TIME_FORMAT = 'h:mma' ; import { timezone } from '@frogpond/constants' ; import moment from 'moment-timezone' ; import type { Moment } from 'moment-timezone' ; type MaybeTime = string | false ; const parseTime = ( now ) => ( time ) : null | Moment => { if ( time === false ) { return null ; } let m = moment . tz ( time , TIME_FORMAT , true , timezone ( ) ) ; m . year ( now . year ( ) ) . month ( now . month ( ) ) . date ( now . date ( ) ) ; return m ; } ; export { parseTime } ;