Changeset 22567 for branches/version-2_12-dev/data/class/SC_Date.php
- Timestamp:
- 2013/02/18 19:09:54 (13 years ago)
- File:
-
- 1 edited
-
branches/version-2_12-dev/data/class/SC_Date.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/SC_Date.php
r22206 r22567 23 23 24 24 /* 日時表示用クラス */ 25 class SC_Date { 25 class SC_Date 26 { 26 27 var $start_year; 27 28 var $month; … … 30 31 31 32 // コンストラクタ 32 function __construct($start_year='', $end_year='') { 33 function __construct($start_year='', $end_year='') 34 { 33 35 if ($start_year) $this->setStartYear($start_year); 34 36 if ($end_year) $this->setEndYear($end_year); 35 37 } 36 38 37 function setStartYear($year) { 39 function setStartYear($year) 40 { 38 41 $this->start_year = $year; 39 42 } 40 43 41 function getStartYear() { 44 function getStartYear() 45 { 42 46 return $this->start_year; 43 47 } 44 48 45 function setEndYear($endYear) { 49 function setEndYear($endYear) 50 { 46 51 $this->end_year = $endYear; 47 52 } 48 53 49 function getEndYear() { 54 function getEndYear() 55 { 50 56 return $this->end_year; 51 57 } 52 58 53 function setMonth($month) { 59 function setMonth($month) 60 { 54 61 $this->month = $month; 55 62 } 56 63 57 function setDay($day) { 64 function setDay($day) 65 { 58 66 $this->day = $day; 59 67 } … … 69 77 * @param string $default_key 70 78 */ 71 function getYear($year = '', $default_year = false, $default_key = '----') { 79 function getYear($year = '', $default_year = false, $default_key = '----') 80 { 72 81 if ($year) $this->setStartYear($year); 73 82 … … 93 102 } 94 103 95 function getZeroYear($year = '') { 104 function getZeroYear($year = '') 105 { 96 106 if ($year) $this->setStartYear($year); 97 107 … … 111 121 } 112 122 113 function getZeroMonth() { 123 function getZeroMonth() 124 { 114 125 115 126 $month_array = array(); … … 121 132 } 122 133 123 function getMonth($default = false) { 134 function getMonth($default = false) 135 { 124 136 $month_array = array(); 125 137 … … 132 144 } 133 145 134 function getDay($default = false) { 146 function getDay($default = false) 147 { 135 148 $day_array = array(); 136 149 … … 144 157 } 145 158 146 function getHour() { 159 function getHour() 160 { 147 161 148 162 $hour_array = array(); … … 154 168 } 155 169 156 function getMinutes() { 170 function getMinutes() 171 { 157 172 158 173 $minutes_array = array(); … … 164 179 } 165 180 166 function getMinutesInterval() { 181 function getMinutesInterval() 182 { 167 183 168 184 $minutes_array = array('00'=>'00', '30'=>'30');
Note: See TracChangeset
for help on using the changeset viewer.
