TimeLogger moved, League ranking also for not completed but started rounds

This commit is contained in:
Torsten 2018-08-17 17:16:01 +02:00
parent 78a4a04cdf
commit 90c6d60ecd
26 changed files with 692 additions and 376 deletions

View file

@ -1015,17 +1015,24 @@ class Carbon extends DateTime implements JsonSerializable
}
/**
* Throws an exception if the given object is not a DateTime and does not implement DateTimeInterface.
* Throws an exception if the given object is not a DateTime and does not implement DateTimeInterface
* and not in $other.
*
* @param mixed $date
* @param mixed $date
* @param string|array $other
*
* @throws \InvalidArgumentException
*/
protected static function expectDateTime($date)
protected static function expectDateTime($date, $other = array())
{
$message = 'Expected ';
foreach ((array) $other as $expect) {
$message .= "{$expect}, ";
}
if (!$date instanceof DateTime && !$date instanceof DateTimeInterface) {
throw new InvalidArgumentException(
'Expected null, string, DateTime or DateTimeInterface, '.
$message.'DateTime or DateTimeInterface, '.
(is_object($date) ? get_class($date) : gettype($date)).' given'
);
}
@ -1049,7 +1056,7 @@ class Carbon extends DateTime implements JsonSerializable
return static::parse($date, $this->getTimezone());
}
static::expectDateTime($date);
static::expectDateTime($date, array('null', 'string'));
return $date instanceof self ? $date : static::instance($date);
}
@ -1847,7 +1854,7 @@ class Carbon extends DateTime implements JsonSerializable
/**
* Set the default format used when type juggling a Carbon instance to a string
*
* @param string $format
* @param string|Closure $format
*
* @return void
*/
@ -1863,7 +1870,9 @@ class Carbon extends DateTime implements JsonSerializable
*/
public function __toString()
{
return $this->format(static::$toStringFormat);
$format = static::$toStringFormat;
return $this->format($format instanceof Closure ? $format($this) : $format);
}
/**
@ -2284,7 +2293,7 @@ class Carbon extends DateTime implements JsonSerializable
/**
* Get the minimum instance between a given instance (default now) and the current instance.
*
* @param \Carbon\Carbon|\DateTimeInterface|mixed $date
* @param \Carbon\Carbon|\DateTimeInterface|string|null $date
*
* @return static
*/
@ -2312,7 +2321,7 @@ class Carbon extends DateTime implements JsonSerializable
/**
* Get the maximum instance between a given instance (default now) and the current instance.
*
* @param \Carbon\Carbon|\DateTimeInterface|mixed $date
* @param \Carbon\Carbon|\DateTimeInterface|string|null $date
*
* @return static
*/
@ -2523,7 +2532,7 @@ class Carbon extends DateTime implements JsonSerializable
{
$date = $date ?: static::now($this->tz);
static::expectDateTime($date);
static::expectDateTime($date, 'null');
return $this->format($format) === $date->format($format);
}
@ -2572,7 +2581,7 @@ class Carbon extends DateTime implements JsonSerializable
{
$date = $date ? static::instance($date) : static::now($this->tz);
static::expectDateTime($date);
static::expectDateTime($date, 'null');
$ofSameYear = is_null($ofSameYear) ? static::shouldCompareYearWithMonth() : $ofSameYear;
@ -4164,7 +4173,7 @@ class Carbon extends DateTime implements JsonSerializable
*/
public function endOfDay()
{
return $this->modify('23.59.59.999999');
return $this->modify('23:59:59.999999');
}
/**
@ -4322,7 +4331,7 @@ class Carbon extends DateTime implements JsonSerializable
*/
public function endOfHour()
{
return $this->setTime($this->hour, 59, 59);
return $this->modify("$this->hour:59:59.999999");
}
/**
@ -4342,7 +4351,27 @@ class Carbon extends DateTime implements JsonSerializable
*/
public function endOfMinute()
{
return $this->setTime($this->hour, $this->minute, 59);
return $this->modify("$this->hour:$this->minute:59.999999");
}
/**
* Modify to start of current minute, seconds become 0
*
* @return static
*/
public function startOfSecond()
{
return $this->modify("$this->hour:$this->minute:$this->second.0");
}
/**
* Modify to end of current minute, seconds become 59
*
* @return static
*/
public function endOfSecond()
{
return $this->modify("$this->hour:$this->minute:$this->second.999999");
}
/**
@ -4616,7 +4645,7 @@ class Carbon extends DateTime implements JsonSerializable
/**
* Modify the current instance to the average of a given instance (default now) and the current instance.
*
* @param \Carbon\Carbon|\DateTimeInterface|null $date
* @param \Carbon\Carbon|\DateTimeInterface|string|null $date
*
* @return static
*/

View file

@ -28,4 +28,13 @@ return array(
'from_now' => ':time sonra',
'after' => ':time sonra',
'before' => ':time əvvəl',
'diff_now' => 'indi',
'diff_yesterday' => 'dünən',
'diff_tomorrow' => 'sabah',
'diff_before_yesterday' => 'srağagün',
'diff_after_tomorrow' => 'birisi gün',
'period_recurrences' => ':count dəfədən bir',
'period_interval' => 'hər :interval',
'period_start_date' => ':date tarixindən başlayaraq',
'period_end_date' => ':date tarixinədək',
);

View file

@ -10,22 +10,29 @@
*/
return array(
'year' => '১ বছর|:count বছর',
'y' => '১ বছর|:count বছর',
'month' => '১ মাস|:count মাস',
'm' => '১ মাস|:count মাস',
'week' => '১ সপ্তাহ|:count সপ্তাহ',
'w' => '১ সপ্তাহ|:count সপ্তাহ',
'day' => '১ দিন|:count দিন',
'd' => '১ দিন|:count দিন',
'hour' => '১ ঘন্টা|:count ঘন্টা',
'h' => '১ ঘন্টা|:count ঘন্টা',
'minute' => '১ মিনিট|:count মিনিট',
'min' => '১ মিনিট|:count মিনিট',
'second' => '১ সেকেন্ড|:count সেকেন্ড',
's' => '১ সেকেন্ড|:count সেকেন্ড',
'ago' => ':time পূর্বে',
'from_now' => 'এখন থেকে :time',
'after' => ':time পরে',
'before' => ':time আগে',
'year' => '১ বছর|:count বছর',
'y' => '১ বছর|:count বছর',
'month' => '১ মাস|:count মাস',
'm' => '১ মাস|:count মাস',
'week' => '১ সপ্তাহ|:count সপ্তাহ',
'w' => '১ সপ্তাহ|:count সপ্তাহ',
'day' => '১ দিন|:count দিন',
'd' => '১ দিন|:count দিন',
'hour' => '১ ঘন্টা|:count ঘন্টা',
'h' => '১ ঘন্টা|:count ঘন্টা',
'minute' => '১ মিনিট|:count মিনিট',
'min' => '১ মিনিট|:count মিনিট',
'second' => '১ সেকেন্ড|:count সেকেন্ড',
's' => '১ সেকেন্ড|:count সেকেন্ড',
'ago' => ':time পূর্বে',
'from_now' => 'এখন থেকে :time',
'after' => ':time পরে',
'before' => ':time আগে',
'diff_now' => 'এখন',
'diff_yesterday' => 'গতকাল',
'diff_tomorrow' => 'আগামীকাল',
'period_recurrences' => ':count বার|:count বার',
'period_interval' => 'প্রতি :interval',
'period_start_date' => ':date থেকে',
'period_end_date' => ':date পর্যন্ত',
);

View file

@ -25,7 +25,7 @@ return array(
'second' => ':count segon|:count segons',
's' => ':count segon|:count segons',
'ago' => 'fa :time',
'from_now' => 'dins de :time',
'from_now' => 'd\'aquí :time',
'after' => ':time després',
'before' => ':time abans',
'diff_now' => 'ara mateix',

View file

@ -31,6 +31,6 @@ return array(
'diff_now' => 'ahora mismo',
'diff_yesterday' => 'ayer',
'diff_tomorrow' => 'mañana',
'diff_before_yesterday' => 'anteayer',
'diff_before_yesterday' => 'antier',
'diff_after_tomorrow' => 'pasado mañana',
);