add date to symptom screen header
This commit is contained in:
1 parent
7d10fbffec
commit
1ed771a50c
4 files changed
+18
-12
No files matched your search
@@ -0,0 +1,9 @@
|
||||
import { LocalDate } from 'js-joda'
|
||||
import moment from 'moment'
|
||||
|
||||
export default function (date) {
|
||||
const today = LocalDate.now()
|
||||
const dateToDisplay = LocalDate.parse(date)
|
||||
const formattedDate = today.equals(dateToDisplay) ? 'today' : moment(date).format('MMMM Do YYYY')
|
||||
return formattedDate.toLowerCase()
|
||||
}
|
||||
Reference in new issue
Block a user