You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "cdfive (GitHub)" <gi...@apache.org> on 2019/01/02 04:28:58 UTC

[GitHub] [incubator-dubbo-website] cdfive opened pull request #226: Update copyright year display in the bottom of site page #224

## What is the purpose of the change

Update copyright year display in the bottom of site page.

Fixes #224 

## Brief changelog

Use new Date().getFullYear() to get the current Year, if it's greater than 2018, add it after the 2018.

Using getFullYear, when the next year is coming, the code need't to modify;

Add the if check to avoid the user's client time less or equal than 2018, which will meet most condition.






[ Full content available at: https://github.com/apache/incubator-dubbo-website/pull/226 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo-website] cdfive commented on issue #226: Update copyright year display in the bottom of site page #224

Posted by "cdfive (GitHub)" <gi...@apache.org>.
> > By the way, the #225 add the 2019 for 'en-us', but the 'zh-cn' seems be omitted, need to be added?
> 
> Yes! Please go ahead and fix it!

ok, I‘ve added it.

[ Full content available at: https://github.com/apache/incubator-dubbo-website/pull/226 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo-website] cdfive commented on issue #226: Update copyright year display in the bottom of site page #224

Posted by "cdfive (GitHub)" <gi...@apache.org>.
@Ruffianjiang @ralf0131 
Considering the user's local time, I add fault-tolerant judgment:
`((new Date().getFullYear() > 2018) ? ('-' + new Date().getFullYear()) : '')`

If the user's local time is moving backwards or has other errors,only the 2018 will be displayed.
The point is to need't modify when the year passed by, and in most condition is right.

But in indeed,I didn't test disabling JavaScript condition.

Also agree with that using static number is an easy and safe way,  the only “deficiency”
is that it needs to update next year.

By the way, the #225 add the 2019 for 'en-us', but the 'zh-cn' seems be omitted,  need to be added?








[ Full content available at: https://github.com/apache/incubator-dubbo-website/pull/226 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo-website] ralf0131 commented on issue #226: Update copyright year display in the bottom of site page #224

Posted by "ralf0131 (GitHub)" <gi...@apache.org>.
Hi, 

I agree with @Ruffianjiang , it is better to have static number here.

Since #225 has been merged. I am going to close this pr.

Again, thanks for your contribution, your passion has been warmly accepted. :) 

Hope you can contribute further in the future!

[ Full content available at: https://github.com/apache/incubator-dubbo-website/pull/226 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo-website] ralf0131 closed pull request #226: Update copyright year display in the bottom of site page #224

Posted by "ralf0131 (GitHub)" <gi...@apache.org>.
[ pull request closed by ralf0131 ]

[ Full content available at: https://github.com/apache/incubator-dubbo-website/pull/226 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo-website] ralf0131 commented on issue #226: Update copyright year display in the bottom of site page #224

Posted by "ralf0131 (GitHub)" <gi...@apache.org>.
> By the way, the #225 add the 2019 for 'en-us', but the 'zh-cn' seems be omitted, need to be added?

Yes! Please go ahead and fix it!

[ Full content available at: https://github.com/apache/incubator-dubbo-website/pull/226 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo-website] Ruffianjiang commented on issue #226: Update copyright year display in the bottom of site page #224

Posted by "Ruffianjiang (GitHub)" <gi...@apache.org>.
I think it not a good idea. First, `new Date().getFullYear()` relies on PC's local time. Second, there are some browsers that disable JavaScript and fail to display correctly and universally.

[ Full content available at: https://github.com/apache/incubator-dubbo-website/pull/226 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org