test(Calendar): add test cases
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { createNamespace } from '../utils';
|
||||
import { padZero } from '../utils/format/string';
|
||||
|
||||
const [createComponent, bem, t] = createNamespace('calendar');
|
||||
|
||||
@@ -8,7 +7,7 @@ export { createComponent, bem, t };
|
||||
export const ROW_HEIGHT = 64;
|
||||
|
||||
export function formatMonthTitle(date: Date) {
|
||||
return t('monthTitle', date.getFullYear(), padZero(date.getMonth() + 1));
|
||||
return t('monthTitle', date.getFullYear(), date.getMonth() + 1);
|
||||
}
|
||||
|
||||
export function compareMonth(date1: Date, date2: Date) {
|
||||
|
||||
Reference in New Issue
Block a user