riku
2026-04-02 3282e95db0207ee133d1e98d9771dec9d83b0fc4
miniprogram_npm/tdesign-miniprogram/calendar/calendar.wxs
@@ -24,7 +24,21 @@
  return ['start', 'end', 'selected', 'centre'].indexOf(dateItem.type) >= 0;
}
function getMonthTitle(year, month, pattern = '') {
  // prettier-ignore
  var REGEXP = getRegExp('\{year\}|\{month\}', 'g');
  return pattern.replace(REGEXP, function (match) {
    var replacements = {
      '{year}': year,
      '{month}': month < 10 ? '0' + month : month,
    };
    return replacements[match] || match;
  });
}
module.exports = {
  getDateLabel: getDateLabel,
  isDateSelected: isDateSelected,
  getMonthTitle: getMonthTitle,
};