fecha.d.ts 964 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. export type Days = [string, string, string, string, string, string, string];
  2. export type Months = [
  3. string,
  4. string,
  5. string,
  6. string,
  7. string,
  8. string,
  9. string,
  10. string,
  11. string,
  12. string,
  13. string,
  14. string
  15. ];
  16. export interface i18nSettings {
  17. amPm: [string, string];
  18. dayNames: Days;
  19. dayNamesShort: Days;
  20. monthNames: Months;
  21. monthNamesShort: Months;
  22. DoFn(D: number): string;
  23. }
  24. export interface Masks {
  25. default: string;
  26. fullDate: string;
  27. longDate: string;
  28. longTime: string;
  29. mediumDate: string;
  30. mediumTime: string;
  31. shortDate: string;
  32. shortTime: string;
  33. [myMask: string]: string;
  34. }
  35. export let masks: Masks;
  36. export let i18n: i18nSettings;
  37. export function format(dateObj: Date | number, mask: string, i18nSettings?: i18nSettings): string;
  38. export function parse(dateStr: string, format: string, i18nSettings?: i18nSettings): Date | boolean;
  39. export as namespace Fecha;