I need to write a program that generates a random date
$start = strtotime('2010-01-01');
$end = strtotime('2018-01-01');
$random_date = date('n F Y l ', rand($start, $end));
then I need to translate the names of months and days into russian
$lat = array ('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'January', 'February', 'March', 'April', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
$rus = array ('Воскресенье', 'Понедельник', 'Вторник', 'Среда', 'Четверг', 'Пятница', 'Суббота', 'Января', 'Февраля', 'Марта', 'Апреля', 'Июня', 'Июля', 'Августа', 'Сентября', 'Октября', 'Ноября', 'Декабря');
return str_replace($lat,$rus, $random_date) ;
$holidays = array('8 января','7 января','14 января', '23 февраля','8 марта','1 апреля','12 апреля','1 мая','9 мая','12 июня','22 июня','1 сентября','27 сентября','4 ноября','12 декабря','31 декабря','1 января');//dates of rus holidays
Then I need to display the date in this format:
2 Февраля 2014 Пятница (2 February 2014 Friday).
Here's what I am having trouble with:
The end result must look like this: 2 February 2014 Friday holiday and/or weekend. So, I need to specify whether the displayed date is a weekend or/ and a holiday. Could someone help?