Add missing commits. *Again*
*grml* this is realy annoying.
This commit is contained in:
parent
55b94901ad
commit
f31f5691fa
3 changed files with 4 additions and 4 deletions
|
@ -9,7 +9,7 @@ class RelativeDateType1 {
|
||||||
private $month_or_year = -1;
|
private $month_or_year = -1;
|
||||||
|
|
||||||
public static function getRegex() {
|
public static function getRegex() {
|
||||||
return DateTranslator::getInstance()->translate('/([Erster|Zweiter|Dritter|Letzter]+) ([Montag|Dienstag|Mittwoch|Donnerstag|Freitag|Samstag|Sonntag]+) des ([Monats|Jahres]+)/im');
|
return DateTranslator::getInstance()->translate('/^([Erster|Zweiter|Dritter|Letzter]+) ([Montag|Dienstag|Mittwoch|Donnerstag|Freitag|Samstag|Sonntag]+) des ([Monats|Jahres]+)$/im');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getOrdinal() {
|
private function getOrdinal() {
|
||||||
|
@ -50,7 +50,7 @@ class RelativeDateType1 {
|
||||||
|
|
||||||
public function getCurrent(\DateTime $now) {
|
public function getCurrent(\DateTime $now) {
|
||||||
$date = new \DateTime();
|
$date = new \DateTime();
|
||||||
$date->setTimestamp (strtotime (sprintf ('%s %s %s %d', $this->getOrdinal (), $this->getDay (), $now->format('F'), $now->format('Y'))));
|
$date->setTimestamp (strtotime (sprintf ('%s %s of %s %d', $this->getOrdinal (), $this->getDay (), $now->format('F'), $now->format('Y'))));
|
||||||
$date->setTime($now->format('H'),$now->format('i'));
|
$date->setTime($now->format('H'),$now->format('i'));
|
||||||
|
|
||||||
return $date;
|
return $date;
|
||||||
|
|
|
@ -8,7 +8,7 @@ class RelativeDateType2 {
|
||||||
private $days_or_week = -1;
|
private $days_or_week = -1;
|
||||||
|
|
||||||
public static function getRegex() {
|
public static function getRegex() {
|
||||||
return DateTranslator::getInstance()->translate('/Alle (\d+) ([Wochen|Tage]+)/im');
|
return DateTranslator::getInstance()->translate('/^Alle (\d+) ([Wochen|Tage]+)$/im');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCurrent(\DateTime $now) {
|
public function getCurrent(\DateTime $now) {
|
||||||
|
|
|
@ -13,7 +13,7 @@ class RelativeDateType3 {
|
||||||
private $day = -1;
|
private $day = -1;
|
||||||
|
|
||||||
public static function getRegex() {
|
public static function getRegex() {
|
||||||
return DateTranslator::getInstance()->translate('/Jeder (\d+)\. Tag eines Monats/im');
|
return DateTranslator::getInstance()->translate('/^Jeder (\d+)\. Tag eines Monats$/im');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getDay() {
|
private function getDay() {
|
||||||
|
|
Reference in a new issue