Revert change to unrelated code
This commit is contained in:
@@ -2,7 +2,11 @@ import {getLocales} from 'expo-localization'
|
||||
|
||||
const LOCALE = getLocales()[0]
|
||||
|
||||
export {toSimpleDateString} from '#/lib/strings/time'
|
||||
// we need the date in the form yyyy-MM-dd to pass to the input
|
||||
export function toSimpleDateString(date: Date | string): string {
|
||||
const _date = typeof date === 'string' ? new Date(date) : date
|
||||
return _date.toISOString().split('T')[0]
|
||||
}
|
||||
|
||||
export function localizeDate(date: Date | string): string {
|
||||
const _date = typeof date === 'string' ? new Date(date) : date
|
||||
|
||||
@@ -20,14 +20,6 @@ export function getAge(birthDate: Date): number {
|
||||
return age
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns date string in yyyy-MM-dd format
|
||||
*/
|
||||
export function toSimpleDateString(date: Date | string): string {
|
||||
const _date = typeof date === 'string' ? new Date(date) : date
|
||||
return _date.toISOString().split('T')[0]
|
||||
}
|
||||
|
||||
/**
|
||||
* Compares two dates by year, month, and day only
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user