文件操作 - protectedTokens.js
返回文件管理
返回主菜单
删除本文件
文件: /var/www/OLD/node_modules/date-fns/_lib/protectedTokens.js
编辑文件内容
const dayOfYearTokenRE = /^D+$/; const weekYearTokenRE = /^Y+$/; const throwTokens = ["D", "DD", "YY", "YYYY"]; export function isProtectedDayOfYearToken(token) { return dayOfYearTokenRE.test(token); } export function isProtectedWeekYearToken(token) { return weekYearTokenRE.test(token); } export 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`; }
修改文件时间
将文件时间修改为当前时间的前一年
删除文件