selectCoupon.wxs 316 B

12345678910111213141516
  1. function formatDays(value) {
  2. if (value < 10) {
  3. return '0' + value;
  4. }
  5. return value;
  6. }
  7. var dateFormat = function (d) {
  8. var date = getDate(+d);
  9. return (
  10. date.getFullYear() +
  11. '-' +
  12. formatDays(date.getMonth() + 1) +
  13. formatDays(date.getDate())
  14. );
  15. };
  16. module.exports.dateFormat = dateFormat;