MCPcopy
hub / github.com/DevCloudFE/ng-devui / resolveMonth

Function resolveMonth

devui/datepicker/datepicker.spec.ts:769–781  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

767}
768
769function resolveMonth(str) {
770 if (str.length === 3) {
771 return str.slice(0, 2);
772 } else if (str.length === 2) {
773 if (isNaN(Number(str))) {
774 return str.slice(0, 1);
775 } else {
776 return str;
777 }
778 } else if (str.length === 1) {
779 return str;
780 }
781}
782
783function closeDatePicker(fixture) {
784 tickEvent(document, new Event('click'), fixture);

Callers 1

testNgModelAndYearMonthFunction · 0.70

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected