Update lang/zh-cn.js #1076

Merged
merged 8 commits into from Oct 13, 2013

Projects

None yet

2 participants

@zenozeng

update lang/zh-cn.js, which is more corresponding to the Chinese expression.
更新 lang/zh-cn.js 使之更符合中文表达习惯

Zeno Zeng added some commits Sep 13, 2013
@ichernev
Collaborator

@suupic what do you think? Also can you comment on #1056

@ichernev
Collaborator

Can you please rebase your changes on top of latest rebase.

@zenozeng

@ichernev OK, I'll update test script & rebase my changes later.

@ichernev ichernev commented on the diff Oct 13, 2013
lang/zh-cn.js
- nextWeek : '[下]ddddLT',
- lastDay : '[昨天]LT',
- lastWeek : '[上]ddddLT',
+ sameDay : function () {
+ return this.minutes() === 0 ? "[今天]Ah[点整]" : "[今天]LT";
+ },
+ nextDay : function () {
+ return this.minutes() === 0 ? "[明天]Ah[点整]" : "[明天]LT";
+ },
+ lastDay : function () {
+ return this.minutes() === 0 ? "[昨天]Ah[点整]" : "[昨天]LT";
+ },
+ nextWeek : function () {
+ var startOfWeek, prefix;
+ startOfWeek = moment().startOf('week');
+ prefix = this.unix() - startOfWeek.unix() >= 7 * 24 * 3600 ? '[下]' : '[本]';
@ichernev
ichernev Oct 13, 2013 collaborator

Why would the time from the start of the week to now be more than 7 days?

You can also use moment().startOfWeek().diff() -- that would give a negative number of milliseconds.

@ichernev
ichernev Oct 13, 2013 collaborator

Ah, I see what you're doing. Ignore my comment :)

@ichernev
Collaborator

Thank you for fixing those. Sorry for the delay, I was just hoping to get another opinion on that.

@ichernev ichernev merged commit ea2ab37 into moment:develop Oct 13, 2013

1 check passed

Details default The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment