MCPcopy Index your code
hub / github.com/OpenSignLabs/OpenSign / selectFormat

Function selectFormat

apps/OpenSignServer/Utils.js:700–733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

698};
699
700export const selectFormat = data => {
701 switch (data) {
702 case 'L':
703 return 'MM/dd/yyyy';
704 case 'MM/DD/YYYY':
705 return 'MM/dd/yyyy';
706 case 'DD-MM-YYYY':
707 return 'dd-MM-yyyy';
708 case 'DD/MM/YYYY':
709 return 'dd/MM/yyyy';
710 case 'LL':
711 return 'MMMM dd, yyyy';
712 case 'DD MMM, YYYY':
713 return 'dd MMM, yyyy';
714 case 'YYYY-MM-DD':
715 return 'yyyy-MM-dd';
716 case 'MM-DD-YYYY':
717 return 'MM-dd-yyyy';
718 case 'MM.DD.YYYY':
719 return 'MM.dd.yyyy';
720 case 'MMM DD, YYYY':
721 return 'MMM dd, yyyy';
722 case 'MMMM DD, YYYY':
723 return 'MMMM dd, yyyy';
724 case 'DD MMMM, YYYY':
725 return 'dd MMMM, yyyy';
726 case 'DD.MM.YYYY':
727 return 'dd.MM.yyyy';
728 case 'DD-MMM-YYYY':
729 return 'dd-MMM-yyyy';
730 default:
731 return 'MM/dd/yyyy';
732 }
733};
734
735export function formatDateTime(date, dateFormat, timeZone, is12Hour) {
736 const zonedDate = toZonedTime(date, timeZone); // Convert date to the given timezone

Callers 1

formatDateTimeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected