PHP Classes

File: infrastructure/libraries/Moment/Locales/pl_PL.php

Recommend this page to a friend!
  Classes of Maicon gonçalez   Potato Service   infrastructure/libraries/Moment/Locales/pl_PL.php   Download  
File: infrastructure/libraries/Moment/Locales/pl_PL.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Potato Service
Framework that extracts route details from classes
Author: By
Last change:
Date: 1 year ago
Size: 2,978 bytes
 

Contents

Class file image Download
<?php

// locale: Polski (Poland) (pl_PL)
// author: Mateusz B?aszczyk https://github.com/Zaszczyk

use Moment\Moment;

$ifLastDigitIsSpecial = function ($count, $trueString, $falseString)
{
   
$specialDigits = array('2', '3', '4');

    return
        (
in_array(mb_substr((string)$count, -1), $specialDigits) && $count > 20)
        ||
in_array((string)$count, $specialDigits)
            ?
$trueString : $falseString;
};

$femaleWeekdays = array('3', '6', '7');

return array(
   
"months" => explode('_', 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_wrze?nia_pa?dziernika_listopada_grudnia'),
   
"monthsNominative" => explode('_', 'stycze?_luty_marzec_kwiecie?_maj_czerwiec_lipiec_sierpie?_wrzesie?_pa?dziernik_listopad_grudzie?'),
   
"monthsShort" => explode('_', 'sty._lut._mar._kwi._maj_cze._lip._sie._wrz._pa?._lis._gru.'),
   
"weekdays" => explode('_', 'poniedzia?ek_wtorek_?roda_czwartek_pi?tek_sobota_niedziela'),
   
"weekdaysShort" => explode('_', 'pon._wt._?r._czw._pt._sob._niedz.'),
   
"calendar" => array(
       
"sameDay" => '[dzisiaj]',
       
"nextDay" => '[jutro]',
       
"lastDay" => '[wczoraj]',
       
"lastWeek" => function (Moment $moment) use ($femaleWeekdays)
        {
           
$pre = 'ostatni';

            if (
in_array($moment->getWeekday(), $femaleWeekdays))
            {
               
$pre = 'ostatnia';
            }

            return
'[' . $pre . '] l';
        },
       
"sameElse" => 'l',
       
"withTime" => '[o] H:i',
       
"default" => 'd.m.Y',
    ),
   
"relativeTime" => array(
       
"future" => 'za %s',
       
"past" => '%s temu',
       
"s" => 'kilka sekund',
       
"ss" => function ($count) use ($ifLastDigitIsSpecial)
        {
            return
$ifLastDigitIsSpecial($count, '%d sekundy', '%d sekund');
        },
       
"m" => '1 minut?',
       
"mm" => function ($count) use ($ifLastDigitIsSpecial)
        {
            return
$ifLastDigitIsSpecial($count, '%d minuty', '%d minut');
        },
       
"h" => '1 godzin?',
       
"hh" => function ($count) use ($ifLastDigitIsSpecial)
        {
            return
$ifLastDigitIsSpecial($count, '%d godziny', '%d godzin');
        },
       
"d" => '1 dzie?',
       
"dd" => '%d dni',
       
"M" => '1 miesi?c',
       
"MM" => function ($count) use ($ifLastDigitIsSpecial)
        {
            return
$ifLastDigitIsSpecial($count, '%d miesi?ce', '%d miesi?cy');
        },
       
"y" => '1 rok',
       
"yy" => function ($count) use ($ifLastDigitIsSpecial)
        {
            return
$ifLastDigitIsSpecial($count, '%d lata', '%d lat');
        },
    ),
   
"ordinal" => function ($number)
    {
        return
$number . '.';
    },
   
"week" => array(
       
"dow" => 1, // Monday is the first day of the week.
       
"doy" => 4 // The week that contains Jan 4th is the first week of the year.
   
),
);