gjb2048 / moodle-theme_essential

The Essential Moodle Theme
https://gjb2048.github.io/moodle-theme_essential/
GNU General Public License v3.0
91 stars 120 forks source link

Copyright date localization #425

Closed a3dho3yn closed 9 years ago

a3dho3yn commented 9 years ago

As of introducing calendar systems, it's better to use userdate() instead of php date() in footer.php: date("Y") -> userdate(time(), '%Y')

gjb2048 commented 9 years ago

What version of Essential please?

Where is the referenced justification that states it is better please?

a3dho3yn commented 9 years ago

I'm using 2.7.9.2 but I think this is common in all versions. In hijri calendar we are in 1436 and in jalali calendar we are in 1393. But date("Y") shows 2015 (which is only correct for gregorian calendar).

gjb2048 commented 9 years ago

Clearly I am unable to test this, so I need justifiable qualified sources that clearly demonstrate this sort of change is credible.

a3dho3yn commented 9 years ago

Why you are unable to test this? You can install calendar types from moodle plugins directory and check whether this code works or not. And If you are not sure which year is this on that calendar system, you can google it. So, where is the problem?

gjb2048 commented 9 years ago

I did not know about the different calendar types on: https://moodle.org/plugins/browse.php?list=category&id=51.

a3dho3yn commented 9 years ago

Jalali calendar is official calendar in Iran (and Afghanistan) and it's meaningless to say 2015. I don't know these will help or not http://en.wikipedia.org/wiki/Islamic_calendar http://en.wikipedia.org/wiki/Jalali_calendar http://en.wikipedia.org/wiki/Solar_Hijri_calendar

gjb2048 commented 9 years ago

I see that with the Jalali calendar it would be meaningless to say 2015 - well duh!

I'll fix this when I can find a free hour to implement and test in M2.7 / M2.8 branches.

a3dho3yn commented 9 years ago

Thanks!