Rate this article

Delete leading zeros from MX Calendar days

Rating: 5.0/5 (1 vote cast)

To improve the look of the calenendar and calendar nugger you can remove the leading zeros from dates between 01 and 09

The process involves editing 3 files

includes\resources\CAL.res.php

Add the following lines

$res = array(
'01'=>'1',
'02'=>'2',
'03'=>'3',
'04'=>'4',
'05'=>'5',
'06'=>'6',
'07'=>'7',
'08'=>'8',
'09'=>'9',
'Sunday' => 'Sunday',
............

includes/cal/CAL_ViewDay.class.php

Replace this

<?php echo CAL_getResource($this->data['nav']['title']['weekday']);?>, <?php echo CAL_getResource($this->data['nav']['title']['month']);?> <?php echo $this->data['nav']['title']['day'];?>,  <?php echo $this->data['nav']['title']['year'];?>

with this

<?php echo CAL_getResource($this->data['nav']['title']['weekday']);?>, <?php echo CAL_getResource($this->data['nav']['title']['month']);?> <?php echo
CAL_getResource($this->data['nav']['title']['day']);?>,  <?php echo $this->data['nav']['title']['year'];?>

includes/cal/CAL_ViewWeek.class.php

Replace this

<?php echo CAL_getResource($this->data['nav']['title']['end']['month']);?> <?php echo $this->data['nav']['title']['end']['day'];?>

With this

<?php echo CAL_getResource($this->data['nav']['title']['end']['month']);?> <?php echo CAL_getResource($this->data['nav']['title']['end']['day']);?>


Adobe

Free PositiveSSL and WhoisGuard with Every Domain Purchase
ionCube Online PHP Encoder
XMS Systems

Although we try to ensure all the articles submitted are valid it is your responsibility to make sure you have backups before you use these suggestions on your pc or websites.
We do not take any responsibility for any data-loss, loss in functionality or any problem that might arise in what-ever way or form by making use of the information on this site.

"Friends of Interakt" has no connection to the Adobe Interakt Company