文件操作 - protectedTokens.cjs
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/date-fns/_lib/protectedTokens.cjs
编辑文件内容
"use strict"; exports.isProtectedDayOfYearToken = isProtectedDayOfYearToken; exports.isProtectedWeekYearToken = isProtectedWeekYearToken; exports.warnOrThrowProtectedError = warnOrThrowProtectedError; const dayOfYearTokenRE = /^D+$/; const weekYearTokenRE = /^Y+$/; const throwTokens = ["D", "DD", "YY", "YYYY"]; function isProtectedDayOfYearToken(token) { return dayOfYearTokenRE.test(token); } function isProtectedWeekYearToken(token) { return weekYearTokenRE.test(token); } function warnOrThrowProtectedError(token, format, input) { const _message = message(token, format, input); console.warn(_message); if (throwTokens.includes(token)) throw new RangeError(_message); } function message(token, format, input) { const subject = token[0] === "Y" ? "years" : "days of the month"; return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`; }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件