Simple PHP Script

IN PROGRESS
Bids
20
Avg Bid (USD)
$61
Project Budget (USD)
$30 - $250

Project Description:
I need a PHP script to return a date range for me that will be used for a digital coupon.
It needs to handle both English and Spanish.

$startdate=""; //This assumes $startdate="20130201" or $startdate="" when today is March 1, 2013
$numberofdays=7;
$language="E";
$result=GiveDateRange($startdate,$numberofdays,$language);
$result returns:
"Valid: Fri. Mar 1, 2013 - Fri. Mar 8, 2013"

This script is not a big deal. I have given great specs below and examples to make it clear.

$startdate=""; //Blank=today, otherwise format "yyyymmdd"
$numberofdays=7;

so endate is $startdate + $numberordays
$language = "E" "S" "BE" "BS";
Which language
"E"=English,
"S"=Spanish,
"BE"=both English Spanish,
"BS"=Both. Spanish English

Here are your translations needed:

Day Translation
Sunday/Domingo
Monday/Lunes
Tuesday/Martes
Wednesday/Miércoles
Thursday/Jueves
Friday/Viernes
Saturday/Sábado

English Day Abbrevations. (Starting with Sunday)
Sun.
Mon.
Tue.
Wed.
Thu.
Fri.
Sat.

English Month Abbrevations.
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec


Spanish Day Abbrevations. (Starting with Sunday)
Dom.
Lun.
Mar.
Mié.
Jue.
Vie.
Sáb.

Spanish Month Abbreviations
Enero
Feb.
Marzo
Abr.
Mayo
Jun.
Jul.
Agosto
Sept.
Oct.
Nov.
Dic.



-----------------------------------------
Example of output.
-----------------------------------------

Example 1: (Today is March 1, 2013)
$startdate=""; //This assumes today is March 1, 2013
$numberofdays=7;
$language="E";
$result=GiveDateRange($startdate,$numberofdays,$language);
$result returns:
"Valid: Fri. Mar 1, 2013 - Fri. Mar 8, 2013"

Example 2:
$startdate="20130315"; // We pass the date of March 15, 2013
$numberofdays=2;
$language="S";
$result=GiveDateRange($startdate,$numberofdays,$language);
$result returns:
"Válido: Vie. Marzo 15, 2013 - Dom. Marzo 17, 2013"


Example 3:
$startdate=""; //This assumes $startdate="20130301" or $startdate="" when today is March 1, 2013
$numberofdays=7;
$language="BE";
****When $language="BE", it will return first the English + + Spanish.
$result=GiveDateRange($startdate,$numberofdays,$language);
$result returns:
"Valid: Fri. Mar 1, 2013 - Fri. Mar 8, 2013Válido: Vie. Marzo 1, 2013 - Vie. Marzo 8, 2013"


Example 4:
$startdate="20130301"; //We pass the date
$numberofdays=7;
$language="BS";
****When $language="BS", it will return first the Spanish + + English .
$result=GiveDateRange($startdate,$numberofdays,$language);
$result returns:
"Válido: Vie. Marzo 1, 2013 - Vie. Marzo 8, 2013 Valid: Fri. Mar 1, 2013 - Fri. Mar 8, 2013"


You will need to supply a working FULLY TESTED script, and a PHP script that will call the working script with 10 different and varied examples.

It is NOT MY JOB to test your script. It's not that complex, so please be sure to test it in different scenarios, including using examples that
span across 2 months.

Thanks,

Barney

Skills required:
PHP, Software Architecture
About the employer:
Verified
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.


$ 150
in 2 days
$ 65
in 0 days
$ 70
in 1 days
Hire metrixmedia
$ 30
in 1 days
$ 200
in 12 days
$ 150
in 4 days
$ 70
in 1 days
$ 55
in 5 days
$ 30
in 0 days
$ 30
in 3 days