Version 4.2.0
This commit is contained in:
1 parent
0dc2aee5ed
commit
96997ddd8e
2074 files changed
+125454
-55780
No files matched your search
@@ -1,13 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Calendar-specific date functions
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Community Suite
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Calendar
|
||||
* @since 30 Dec 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\calendar;
|
||||
@@ -428,18 +427,28 @@ class _Date extends \IPS\DateTime
|
||||
* @return string
|
||||
*/
|
||||
public function calendarDate( $memberOrLanguage=NULL )
|
||||
{
|
||||
return static::determineLanguage( $memberOrLanguage )->convertString( strftime( static::calendarDateFormat(), $this->getTimestamp() + $this->offset ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the format used by calendarDate()
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function calendarDateFormat()
|
||||
{
|
||||
if( \IPS\Settings::i()->calendar_date_format == -1 AND \IPS\Settings::i()->calendar_date_format_custom )
|
||||
{
|
||||
return static::determineLanguage( $memberOrLanguage )->convertString( strftime( \IPS\Settings::i()->calendar_date_format_custom, $this->getTimestamp() + $this->offset ) );
|
||||
return \IPS\Settings::i()->calendar_date_format_custom;
|
||||
}
|
||||
elseif( isset( static::$dateFormats[ \IPS\Settings::i()->calendar_date_format ] ) )
|
||||
{
|
||||
return static::determineLanguage( $memberOrLanguage )->convertString( strftime( static::$dateFormats[ \IPS\Settings::i()->calendar_date_format ], $this->getTimestamp() + $this->offset ) );
|
||||
return static::$dateFormats[ \IPS\Settings::i()->calendar_date_format ];
|
||||
}
|
||||
else
|
||||
{
|
||||
return static::localeDate();
|
||||
return '%x';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -778,6 +787,6 @@ class _Date extends \IPS\DateTime
|
||||
*/
|
||||
public function localeTime( $seconds=TRUE, $minutes=TRUE, $memberOrLanguage=NULL )
|
||||
{
|
||||
return static::determineLanguage( $memberOrLanguage )->convertString( strftime( $this->localeTimeFormat( $seconds, $minutes, $memberOrLanguage ), $this->getTimestamp() + $this->offset ) );
|
||||
return static::determineLanguage( $memberOrLanguage )->convertString( strftime( static::localeTimeFormat( $seconds, $minutes, $memberOrLanguage ), $this->getTimestamp() + $this->offset ) );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user