{"version":3,"file":"_randomFormatDate.mjs","names":[],"sources":["../../src/internal/_randomFormatDate.ts"],"sourcesContent":["import { _ILengthProps, _randomFormatLength } from \"./_randomStringLength\";\nimport { __IEpochProps, __randomEpoch } from \"./private/__randomEpoch\";\n\n/**\n * Generate a `YYYY-MM-DD` date within the epoch bounds. Custom bounds must\n * describe valid Date instants with four-digit ISO years; expanded-year ISO\n * text is outside this fixed-width generator's contract.\n *\n * @evidence contracts/common.md#principled-implementation With valid Date bounds in the four-digit ISO-year range, a date is the first ten characters of a random instant's ISO text; the fixed-length wrapper checks it against the length bounds and throws when no draw fits. Custom out-of-range instants and expanded ISO years are not normalized here.\n * @evidence contracts/common.md#clear-and-simple-design One expression over the epoch drawer and the fixed-length wrapper.\n * @evidence contracts/common.md#prohibited-implementation-shortcuts The instant bounds are handled by the shared epoch drawer.\n * @evidence contracts/common.md#meaningful-documentation The doc states that the date is the date part of a random instant within the epoch bounds.\n */\nexport const _randomFormatDate = (props?: __IEpochProps & _ILengthProps) =>\n  _randomFormatLength(props, () =>\n    new Date(__randomEpoch(props)).toISOString().substring(0, 10),\n  );\n"],"mappings":";;;;;;;;;;;;;AAaA,MAAa,qBAAqB,UAChC,oBAAoB,aAClB,IAAI,KAAK,cAAc,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,UAAU,GAAG,EAAE,CAC9D"}