msg# 1
How can i change date-time format? In Russia it is "dd.mm.yyyy"?
Votes:8
Average:6.25
msg# 1.1
Quote:
isorokin wrote:
How can i change date-time format? In Russia it is "dd.mm.yyyy"?
It is defined in langauage files.
You should edit language/russian/pical_constants.php
The constant is either of
_PICAL_STRFFMT_DATE or
_PICAL_STRFFMT_DATE_FOR_BLOCK or
_PICAL_FMT_YMD or
_PICAL_FMT_YMDO
Votes:9
Average:3.33
msg# 1.1.1
Can i change date-time format for "index.php?action=Edit", for example, i want enter data in field "Beginning DateTime" not in "yyyy-mm-dd", but in "dd.mm.yyyy"?
Votes:11
Average:4.55
msg# 1.1.1.1
hi isorokin.
The textbox in editting view only supports ISO format because JavaScript Calendar only supports ISO format.
If you and your site guests never use JavaScript Calendar, it is easy to change the format.
Votes:8
Average:2.50
msg# 1.2
I am using piCal 0.8 and I want to change the date format in two places:
The Upcoming Events block, I want to change "9th Mar" to "March 9th 2006"
And in the detail view I want to change "12th July 2006 Wednesday" to "Wednesday July 12th, 2006"
I have been digging around as I thought this would be an easy fix, but I am over my head.
HELP!
Votes:11
Average:4.55
msg# 1.2.1
Though I don't remember such features in correct, you can do that just by editing language files.
edit language/(your_language)/pical_constants.php
eg) for the 2nd request:
// definition of orders Y:year M:month W:week D:day N:dayname O:operand
define('_PICAL_FMT_MD','%2$s %1$s') ;
define('_PICAL_FMT_YMD','%3$s %2$s %1$s') ;
define('_PICAL_FMT_YMDN','%3$s %2$s %1$s %4$s') ; // <- modify here
define('_PICAL_FMT_YMDO','%4$s%3$s%2$s%1$s') ;
define('_PICAL_FMT_YMW','%3$s %2$s %1$s') ;
define('_PICAL_FMT_YW','WEEK%2$s %1$s') ;
define('_PICAL_FMT_DHI','%1$s %2$s:%3$s') ;
define('_PICAL_FMT_HI','%1$s:%2$s') ;
Votes:12
Average:5.00
msg# 1.2.1.1
Ah! Thanks! In case anyone wants to know, I changed:
define('_PICAL_FMT_YMDN','%3$s %2$s %1$s %4$s') ;
to:
define('_PICAL_FMT_YMDN','%4$s %2$s %3$s %1$s') ;
That affected the "Detail Vew."
AND change:
define('_PICAL_FMT_MD','%2$s %1$s') ;
to
define('_PICAL_FMT_MD','%1$s %2$s') ;
...to reverse the order in the "Upcoming Events" block. Although I couldn't get it to display the year there. Oh well, this is good for now.
Votes:26
Average:3.46
msg# 1.2.1.1.1
Edit piCal_xoops.php after the line 425.
Votes:0
Average:0.00
msg# 1.2.1.1.1.1
Thanks! I have another question. I am trying to change the time display for the detail view to show the time as "8:30 AM", rather than "AM 8:30."
I dug around in the english language file, but nothing seemes to change that. the AM/PM seems to be tied to the hour variable. For example, I can make it say "30 AM 8:" but not move the AM to after the minutes. Where do I adjust that? I tried looking in piCal_xoops.php as well, but there's so much in there I couldn't find anything relating to that.
Also, I was wondering if there were plans to add notifications so that users will be notified when the event happens, or is one day/week away? Maybe that is already available?
Thanks again!
Votes:0
Average:0.00
msg# 1.2.1.1.1.1.1
It should be into my TODO.
You have to edit class/piCal.php in the current version.
eg)
line 2673 of piCal.php
function get_middle_hi( $time , $is_over24 = false )
{
$hour_offset = $is_over24 ? 24 : 0 ;
$hour4disp = $this->use24 ? $this->hour_names_24[ date( 'G' , $time ) + $hour_offset ] : $this->hour_names_12[ date( 'G' , $time ) + $hour_offset ] ;
return sprintf(
_PICAL_FMT_HI ,
$hour4disp , // H
date( _PICAL_DTFMT_MINUTE , $time ) // I
) ;
return date( "g:i A" , $time ) ;
}
Votes:0
Average:0.00
msg# 1.2.1.1.1.1.1.1
Thanks!
That worked like a charm!
Votes:0
Average:0.00