Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
wfpl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5253f43
)
added this_month() and this_year()
author
Jason Woofenden
<jason183@herkamire.com>
Thu, 21 Dec 2006 04:45:11 +0000
(23:45 -0500)
committer
Jason Woofenden
<jason183@herkamire.com>
Thu, 21 Dec 2006 04:45:11 +0000
(23:45 -0500)
basics.php
patch
|
blob
|
history
diff --git
a/basics.php
b/basics.php
index
72a33a3
..
4e1da44
100644
(file)
--- a/
basics.php
+++ b/
basics.php
@@
-5,9
+5,9
@@
function read_whole_file($name) {
if($fd === false) {
die("Failed to read file: '$name'");
}
if($fd === false) {
die("Failed to read file: '$name'");
}
- $temp = fread($fd, filesize($name));
+ $file_data = fread($fd, filesize($name));
fclose($fd);
fclose($fd);
- return $temp;
+ return $file_data;
}
function unix_newlines($str) {
}
function unix_newlines($str) {
@@
-15,5
+15,14
@@
function unix_newlines($str) {
return str_replace("\r", "\n", $str);
}
return str_replace("\r", "\n", $str);
}
+# return current year (all 4 digits)
+function this_year() {
+ return strftime('%Y');
+}
+
+# return the number of the current month (1..12)
+function this_month() {
+ return strftime('%m');
+}
?>
?>