Simple PHP Script

Closed

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: PHP, Software Architecture

See more: tue-sat, software test scenarios, scenarios test, my job in spanish, english to spanish translation needed, deal of the day script, deal a day script, call scenarios, barney and barney, architecture spanish translation, apr supply, today in spanish translation, test spanish translation, months spanish translation, month spanish translation, monday in spanish translation, mon translation, domingo translation, spanish to english translation needed, abr, vie, software dec, script spanish, english to span, dic

Project ID: #4244871

Awarded to:

zilvensp

Hi there, read my personal message.

$30 USD in 0 days
(3 Reviews)
3.6

20 freelancers are bidding on average $61 for this job

TopSEOExpertscom

Hi, Here's my bid to get it done for you. Let's get started.

$150 USD in 2 days
(212 Reviews)
7.9
marchingantssl

Lets start now. Thanks

$65 USD in 0 days
(111 Reviews)
6.8
dzmitrij

Hello, Can make this work. Regards. Dima

$70 USD in 1 day
(64 Reviews)
5.7
metrixmedia

Hi Mike, thanks for the detailed explanation. Please see PM for my proposal.

$30 USD in 1 day
(38 Reviews)
5.4
Eliteprog

Hi, First of all thanks for posting this project, I am available to provide you economical services for customization of PHP script, I have read and understood all of project details. I am expert in web development More

$200 USD in 12 days
(25 Reviews)
5.3
ambalaonline1

I understood i am ready to start

$150 USD in 4 days
(27 Reviews)
5.2
webangel1

ready to work, please check pmb, Thanks

$70 USD in 1 day
(21 Reviews)
4.5
Razaali75

Hi Have Gone through your requirement and understood, we are very sure that we can do your needs with your entire satisfaction. We have left a PMB for you plz feel free to have a look over there. Thnx

$55 USD in 5 days
(15 Reviews)
3.9
techvolcano

We can do this.

$30 USD in 3 days
(6 Reviews)
3.4
amin6106

Ready to start.

$30 USD in 0 days
(5 Reviews)
3.2
WebProgrammerBD

Hi, Thanks for positing this project with a clear explanation of requirements. It is great. I have been working with PHP over 5 years. I am very much interested to write a simple and standard script for you. I like to More

$50 USD in 2 days
(2 Reviews)
2.7
parthuji

4 years exp and quality work assured

$70 USD in 2 days
(4 Reviews)
2.7
exaltedsol

Hi, I can give you result in one hour now, please give me chance, I am waiting for your reply... Thanks, ES

$30 USD in 0 days
(4 Reviews)
2.5
thilina1990

hello sir, I'm very experiences php developer.so that i can handle this work perfectly an easily.I would like to discuss more with you. thank you. Have a nice day! Thilina.

$30 USD in 0 days
(3 Reviews)
2.4
damithk

Let's start the job.

$30 USD in 0 days
(2 Reviews)
1.8
filipt1

Hello! This is an easy job, it can be done quickly and easily. If you award me this project, not only you will be satisfied with the result, but it can mean the beginning of a fruitful collaboration. I can sho More

$30 USD in 2 days
(1 Review)
1.2
ultimatepredator

Ready to start now. Please start the chat with us. Regards

$30 USD in 0 days
(0 Reviews)
0.0
softwarepk

i can do this job.

$30 USD in 0 days
(0 Reviews)
0.0
unity2022

Please open the chat to discuss. Waiting for your invitation.

$30 USD in 0 days
(0 Reviews)
0.0