Back

Need to Have a Web Script Written

Share this Need with friends or people you think can help:

By mcasey

Accepting offers for: Hurry!

Location: Cedar Park, Texas, 78613

Category: Web & Graphic Design

Budget: $ ?

Payment type: Guaranteed Payment w/ PayPal

Complete by: Jan 29, 2015

Posted: Jan 17, 2015

Offers: 0

Program to Create TimeVistas on my website.

This program will reside on a web page on my WordPress site. An important part of this project will be not only coding the logic, but also implementing and testing the code on my webpage.

Purpose: In my forthcoming book Forward Story, I ask the reader to create his or her TimeVistas. A TimeVista is a period of time that could be as short as six months or as long as ten years. A given TimeVista could also be any number of months or years in-between six months and ten years. The exact number of TimeVistas and the way each is calculated and named depends on the user’s date of birth and desired retirement age. This program will be used to prevent the hand calculations, definitions, and naming of TimeVistas. Since the creation of these TimeVistas needs to happen each year, this program will automate the process for the user.

Here is an example of a hand-calculated set of TimeVistas for a user that desires to retire at age 72 and that is currently 24 years old. There are 48 years between these two ages:

• Retirement (Date) age 72
• Decade Preceding Retirement (Date–Date) ages 62–71
• BRIDGE: Years Thirty-One through Thirty-Eight (Date–Date) ages 54–61
• Years Twenty-One through Thirty (Date–Date) ages 44–53
• Years Eleven through Twenty (Date–Date) ages 34–43
• Years Six through Ten (Date–Date) ages 29–33
• Years Three through Five (Date–Date) ages 26–28
• Second Year (Date–Date) age 25
• Second Six Months (Date–Date) age 24
• First Six Months (Today–Date) age 24

In the book, the TimeVistas above are further described in this way: “For now, ignore what is inside the parentheses. When you create your own TimeVistas, you will include your specific date ranges.”

Ideally, I would like for the program to calculate both the ages and the date ranges for each TimeVista.

The required output of the program is text like the example above that can be copied to the user’s clipboard and pasted into a word processor.

Approach: I am looking for your solution to this problem and am open to the most efficient way to do it. However, I do have some ideas about how to implement it in code. Let me share my ideas as a basis for you to evaluate your approach and to offer a bid to do the work.

This problem is more challenging than it may first appear.

User Inputs:

• Date_of_Birth = [this is a date field in the format xx/xx/xxxx]
• Desired_Retirement_Age= [this is a numeric field that can be a max of 3 digits]
• Today_Date = [this is a date field to default to the date on the user’s client system in date format of xx/xx/xxxx]. However, the user should have a CHANGE DATE button to click which will allow editing of the field. Once the date is correct, the user will click a SUBMIT or OK button to enter the value.

Calculated Values:

• Current_Age = [Today_Date – Date_of_Birth] The number returned will represent age in years. This may be an integer or it may need to be a decimal (this depends on the required logic and output).
• Total_Years = [Desired_Retirment_Age – Current_Age]
• Number_of_Required_Periods = [This should be an integer that is (possibly) determined with a Case statement – notice that in the example above that when the Total_Years is 48, there are 10 TimeVistas required, including a Bridge Period]
• Bridge_Period_Required_Flag = [This should be a Yes/No flag that is set with a Case statement] Notice from the example TimeVistas that one of these periods is a custom period that in this case spans 8 years. Depending on the user’s specifics, this Bridge Period could be any number up to ten years, or it could be completely unnecessary.

A “brute force” way to do this is for me to develop a large Case statement with a range of Total_Year from 90 down to 1 that actually spells out the text to be returned to the user.
The Case statement might be something like:

Case 90
.
.
.
Case 48

Retirement (Date) age 72
Decade Preceding Retirement (Date–Date) ages 62–71
BRIDGE: Years Thirty-One through Thirty-Eight (Date–Date) ages 54–61
Years Twenty-One through Thirty (Date–Date) ages 44–53
Years Eleven through Twenty (Date–Date) ages 34–43
Years Six through Ten (Date–Date) ages 29–33
Years Three through Five (Date–Date) ages 26–28
Second Year (Date–Date) age 25
Second Six Months (Date–Date) age 24
First Six Months (Today–Date) age 24
.
.
.
Case 1

Your program will do a calculation to fill in both the date ranges and the ages
I am certainly open to a more elegant way to do this, but I also do not mind creating the text for each of these cases.

I need this to also be mobile-friendly for users accessing it on a mobile device.

Please respond with which scripting language you propose for this, how much it will cost to develop and install, how long it will take, and when you can start.
  • register Mar 4, 2015 10:28am
    Greetings, do you still have a need for this program? If Yes, could you please clarify your budget and timing? Kind Regards