miniBB ® 

miniBB

®
Support Forums
  
 | Start | Register | Search | Statistics | File Bank | Manual |
Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /  
 

Setting up Buddha time (+543 years later than Jesus era started)

 
Author Anonymous
Guest
#1 | Posted: 24 Jan 2005 10:14 
I was wondering if it was possible to change the year format from e.g. 2005 to 2548?

Thanks

Author Team
8-)
#2 | Posted: 24 Jan 2005 11:52 
function convert_date($dateR){
$engMon=array('January','February','March','April','May','June','July' ,'August','September','October','November','December',' ');
$months=explode (':', $GLOBALS['l_months']);
$months[]=' ';
$year=date('Y',strtotime($dateR))+543;
$GLOBALS['dateFormat']=str_replace('Y', $year, $GLOBALS['dateFormat']);

if(isset($GLOBALS['timeDiff']) and $GLOBALS['timeDiff']!=0) $dateR=date($GLOBALS['dateFormat'],strtotime($dateR)+$GLOBALS['timeDif f']);
else $dateR=date($GLOBALS['dateFormat'],strtotime($dateR));
$dateR=str_replace($engMon,$months,$dateR);
return $dateR;
}

cursived are new strings.

Author Anonymous
Guest
#3 | Posted: 24 Jan 2005 12:58 
Thank for your reply.
I copied your new function convert_date to bb_function.php

It still does not work!
Year is still 2005

Author Team
8-)
#4 | Posted: 24 Jan 2005 13:03 
Don't copy the whole function, just insert 2 new lines in the old function.

It should work. I've checked on my server and it works.

Author Ivan
Advanced Member
#5 | Posted: 24 Jan 2005 13:18 
Excuse me for the input, I only became curious, why is that the year to be another year after 500 years? :)

Author Anonymous
Guest
#6 | Posted: 24 Jan 2005 13:46 
To Ivan
Because my buddha year is 2548.
So I need to +543 years more form Jessus year.

To Team
I tried to add this 2 lines
$year=date('Y',strtotime($dateR))+543;
$GLOBALS['dateFormat']=str_replace('Y', $year, $GLOBALS['dateFormat']);

It still does not work again.
Do you have the other way?
Anyway Thank a millions

Author Team
8-)
#7 | Posted: 24 Jan 2005 14:10 
Which $dateFormat setting do you have?

You need to have 'Y' inside of it.

My example:

$dateFormat='j F Y H:i';

Author Anonymous
Guest
#8 | Posted: 24 Jan 2005 16:40 
I got it!
Thank You So Much.

I have another question.
If I want to show only 48 insted of 2548.
How could I do?
Thank in advance.

Author Team
8-)
#9 | Posted: 24 Jan 2005 16:44 
$GLOBALS['dateFormat']=str_replace('Y', substr($year,-2), $GLOBALS['dateFormat']);

Author Anonymous
Guest
#10 | Posted: 24 Jan 2005 20:21 
Thank You So Much
You did very good job!

Custom Tutorials and Modifications miniBB Support Forums / Custom Tutorials and Modifications /
 Setting up Buddha time (+543 years later than Jesus era started)
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message


  ?
Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.


Before posting, make sure your message is compliant with forum rules; otherwise it could be locked or removed with no explanation.

 

 
miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Try the Captcha add-on: protect your miniBB-forums from the automated spam and flood.


  ⇑