projects
/
tweeper.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use more accurate names for the date conversion functions
[tweeper.git]
/
tweeper.php
diff --git
a/tweeper.php
b/tweeper.php
index
fdf6e5c
..
3e250b7
100644
(file)
--- a/
tweeper.php
+++ b/
tweeper.php
@@
-44,24
+44,24
@@
class Tweeper {
/**
* Convert numeric Epoch to the date format expected in a RSS document.
*/
/**
* Convert numeric Epoch to the date format expected in a RSS document.
*/
- public static function epochTo
Gmd
ate($timestamp) {
+ public static function epochTo
RssD
ate($timestamp) {
if (!is_numeric($timestamp) || is_nan($timestamp)) {
$timestamp = 0;
}
if (!is_numeric($timestamp) || is_nan($timestamp)) {
$timestamp = 0;
}
- return gmdate(
'D, d M Y H:i:s', $timestamp) . ' GMT'
;
+ return gmdate(
DATE_RSS, $timestamp)
;
}
/**
* Convert generic date string to the date format expected in a RSS document.
*/
}
/**
* Convert generic date string to the date format expected in a RSS document.
*/
- public static function strTo
Gmd
ate($date) {
+ public static function strTo
RssD
ate($date) {
$timestamp = strtotime($date);
if (FALSE === $timestamp) {
$timestamp = 0;
}
$timestamp = strtotime($date);
if (FALSE === $timestamp) {
$timestamp = 0;
}
- return Tweeper::epochTo
Gmd
ate($timestamp);
+ return Tweeper::epochTo
RssD
ate($timestamp);
}
/**
}
/**