We usually use the function "the_time" in order to display time on our blogs.
My question is how do we change the display time, for example, This year is 2006, but I would like to display year as 2549. How do I do that?
Regards,
Lee
We usually use the function "the_time" in order to display time on our blogs.
My question is how do we change the display time, for example, This year is 2006, but I would like to display year as 2549. How do I do that?
Regards,
Lee
Well, that post would NOT appear until the year 2549 will come.
If that's what you want > when writing post click the "Edit Timestamp" box and edit the year, month... time accordingly.
Sorry, it's totally fault that i didn't explain clearly.
My meaning is that based on Thai calendar, this year is 2549 for Thai people on Thai calendar . When I posted blog on my WordPress, the year is shown as 2006, I would like to display it in Thai calendar that is 2549. However, I wouldn't like to change anyting in the database.
Regards,
Lee
I am afraid PHP doesn't have support for the Thai calendar. You should check this on a PHP related forum/site.
Is the Thai calendar the same than the Gregorian calendar (exc the year)? Or do you have different days and month, too?
Edited:
Yes
http://en.wikipedia.org/wiki/Thai_solar_calendar
You have to edit every time, mktime and edit the year before displaying. Just adding an integer won't work (leap years).
Of course, it's NOT the same... otherwise they would call it Gregorian :)
http://en.wikipedia.org/wiki/Thai_solar_calendar
Thank you for your comments,
The different thing is that in Thai calendar, we have to add more 543, for example, this year is 2549 (2006+543)
I've tried to edit the php script that was
php the_time('jS F, Y'+534) or
.....Y+534')
but it still doesn't work
Somebody just did an Gregorian Date to Jalali Date Converter for wordpress. Perhaps you can ask them which php-comments you to change
http://codex.wordpress.org/Plugins/Calendar_Event
If it's a simple math issue:
<?php
$thai_year = get_the_time('Y') + 543;
the_time('jS F, ' . $thai_year);
?>
Kafkaesqui, thank you
your suggestion is very useful, now my calendar diplays the correct year properly in Thai :)
This topic has been closed to new replies.