Jump to content

is there a script for addition and subtraction of time?


Recommended Posts

I need to add and subtract minutes from a given time in military time format (e.g., 8:45 p.m. is 2045).

Let's say the function header looks like this:

func timeAdd($time,$minutes)

then timeAdd(2239,27) would return 2306.

Is there a script already out there for this? I couldn't find one in the scripts section, but perhaps I wasn't using the correct keyword to search for one.

Link to comment
Share on other sites

  • Developers

I need to add and subtract minutes from a given time in military time format (e.g., 8:45 p.m. is 2045).

Let's say the function header looks like this:

func timeAdd($time,$minutes)

then timeAdd(2239,27) would return 2306.

Is there a script already out there for this? I couldn't find one in the scripts section, but perhaps I wasn't using the correct keyword to search for one.

_dateAdd() will work when the the input is put in the correct format... :)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...