Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [php]Przetwarzanie daty
Forum PHP.pl > Forum > PHP
demoniczny
  1.  
  2. function polishDate($date)
  3. {
  4. $date = explode("-", $date);
  5. $month = array(
  6. "1" => "Styczen",
  7. "2" => "Luty",
  8. "3" => "Marzec",
  9. "4" => "Kwiecien",
  10. "5" => "Maj",
  11. "6" => "Czerwiec",
  12. "7" => "Lipiec",
  13. "8" => "Sierpien",
  14. "9" => "Wrzesien",
  15. "10" => "Pazdziernik",
  16. "11" => "Listopad",
  17. "12" => "Grudzien",
  18. );
  19. $days = array(
  20. "Monday" => "Poniedzialek",
  21. "Tuesday" => "Wtorek",
  22. "Wednesday" => "Sroda",
  23. "Thursday" => "Czwartek",
  24. "Friday" => "Piatek",
  25. "Saturday" => "Sobota",
  26. "Sunday" => "Niedziela",
  27. );
  28. echo $month[$date[1]];
  29.  
  30. }


Mam funkcję do przetwarzania daty na polską lecz nie wiem jak zrobić z dniami aby wyświetlało polskiego odpowiednika
Będą to daty typu Poniedziałek Listopad 1992
Crozin
Nie kombinuj - http://pl.php.net/manual/en/book.intl.php
demoniczny
Kurde nie znam za dobrze angielskiego a manual jest po angielsku ;/

które może być właściwe?
  1. IntlDateFormatter — The IntlDateFormatter class
  2. IntlDateFormatter::create — Create a date formatter
  3. IntlDateFormatter::format — Format the date/time value as a string
  4. IntlDateFormatter::getCalendar — Get the calendar used for the IntlDateFormatter
  5. IntlDateFormatter::getDateType — Get the datetype used for the IntlDateFormatter
  6. IntlDateFormatter::getErrorCode — Get the error code from last operation
  7. IntlDateFormatter::getErrorMessage — Get the error text from the last operation.
  8. IntlDateFormatter::getLocale — Get the locale used by formatter
  9. IntlDateFormatter::getPattern — Get the pattern used for the IntlDateFormatter
  10. IntlDateFormatter::getTimeType — Get the timetype used for the IntlDateFormatter
  11. IntlDateFormatter::getTimeZoneId — Get the timezone-id used for the IntlDateFormatter
  12. IntlDateFormatter::isLenient — Get the lenient used for the IntlDateFormatter
  13. IntlDateFormatter::localtime — Parse string to a field-based time value
  14. IntlDateFormatter::parse — Parse string to a timestamp value
  15. IntlDateFormatter::setCalendar — sets the calendar used to the appropriate calendar, which must be
  16. IntlDateFormatter::setLenient — Set the leniency of the parser
  17. IntlDateFormatter::setPattern — Set the pattern used for the IntlDateFormatter
  18. IntlDateFormatter::setTimeZoneId — Sets the time zone to use
skowron-line
@demoniczny czy ty przypadkiem nie przesadzasz questionmark.gif
http://translate.google.pl/
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.