Rev 9 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9 | Rev 24 | ||
---|---|---|---|
Line 18... | Line 18... | ||
18 | * limitations under the License. |
18 | * limitations under the License. |
19 | */ |
19 | */ |
20 | 20 | ||
21 | function get_last_weekday_date($dow) { |
21 | function get_last_weekday_date($dow) { |
22 | for ($i=0; $i<=6; $i++) { |
22 | for ($i=0; $i<=6; $i++) { |
23 | $d = ftime()-$i*86400; |
23 | $d = time()-$i*86400; |
24 | $e = date('N', $d); |
24 | $e = date('N', $d); |
25 | if ($e == $dow) { |
25 | if ($e == $dow) { |
26 | return date('d.m.Y', $d); |
26 | return date('d.m.Y', $d); |
27 | } |
27 | } |
28 | } |
28 | } |