Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: uni-dateformat/date-format.js 添加星期支持 #810

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mipous
Copy link

@Mipous Mipous commented Oct 7, 2023

为日期格式化添加星期支持

  • Token 'E' 识别为星期,根据 新参数 locale: (zh/en) 识别对应星期语言, 默认 zh
  • friendlyDate 函数已支持新参数
  • friendlyDate 函数支持 2周后3 weeks ago 的周显示
formatDate(new Date(), 'yyyy年M月d日 星期E')
// 2023年10月7日 星期六

formatDate(new Date(), 'E, M, d, yyyy' 'en')
// Saturday, 10, 7, 2023

@suchenwon
Copy link

@Otto-J 这功能好用,加上吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants