Skip to content
导航栏

日期

formatDate

格式化日期

typescript
import { formatDate } from '@fang-kang/js-utils';

formatDate(new Date(), 'yyyy-MM-dd');

isAfterDate

检查是否在某日期后

typescript
import { isAfterDate } from '@fang-kang/js-utils';

isAfterDate(new Date(2010, 10, 21), new Date(2010, 10, 20)); // true

isBeforeDate

检查是否在某日期前

typescript
import { isBeforeDate } from '@fang-kang/js-utils';

isBeforeDate(new Date(2010, 10, 20), new Date(2010, 10, 21)); // true

Released under the MIT License.