Hi everybody,
I have my own library and function which can convert Gregorian calendar to my own calendar. In general it works without problem.
For example, when I use some code like this, it returns the correct result for me.
`require_once jdf.php;
function convert($date) {
if(($date) == '0000-00-00 00:00:00'){
echo '';
}else{
echo mds_date('Y-m-d H:i:s', strtotime($date), 1);
}
}
$query = '';
$results = mysqli_query($db, $query);
while($row = mysqli_fetch_array($results)) {
echo convert($row['DEL_DELEGATE_DATE'][);
}
But, when I want to use it in another application, it does not work.
I add the convert function like this:
dDelegateDate' => $this -> createDateFromString(convert($row['DEL_DELEGATE_DATE']))
How to add convert function to the OOP file?
Thanks in advance