Add missing commits. *Again*

*grml* this is realy annoying.
This commit is contained in:
Tim Schumacher 2016-06-02 14:52:40 +02:00
parent 55b94901ad
commit f31f5691fa
3 changed files with 4 additions and 4 deletions

View file

@ -9,7 +9,7 @@ class RelativeDateType1 {
private $month_or_year = -1;
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() {
@ -50,7 +50,7 @@ class RelativeDateType1 {
public function getCurrent(\DateTime $now) {
$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'));
return $date;

View file

@ -8,7 +8,7 @@ class RelativeDateType2 {
private $days_or_week = -1;
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) {

View file

@ -13,7 +13,7 @@ class RelativeDateType3 {
private $day = -1;
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() {