Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helper module to handle date time(in PT Format) related calculations #24

Closed

Conversation

Nimesh-Msys
Copy link
Contributor

@Nimesh-Msys Nimesh-Msys commented Mar 22, 2018

Functionalities to convert date time (in PT format) in total minutes/seconds.
eg, when time_str = PT1M60S it will be either 2 mins OR 120 seconds in total.
time_in_minutes(time_str) OR time_in_seconds(time_str) will give this result
This may stretch up to hours/days/months even years

When user inserts some random time interval during creating/updating a task (say in minutes; (65)) ,then while retrieving trigger information, windows returns PT1M5S. Hence, he must be able to check this result as 65 mins again.
Signed-off-by: Nimesh Patni nimesh.patni@msystechnologies.com

- applied while getting trigger() details of a task

Signed-off-by: Nimesh Patni <nimesh.patni@msystechnologies.com>
…her time related fields)

Signed-off-by: Nimesh Patni <nimesh.patni@msystechnologies.com>
@Nimesh-Msys Nimesh-Msys changed the title - added methods to convert "PT{HMS}" format in total minutes - Added methods to convert "PT{HMS}" format in total minutes Mar 22, 2018
@Nimesh-Msys Nimesh-Msys changed the title - Added methods to convert "PT{HMS}" format in total minutes [DoNot Merge] Added methods to convert "PT{HMS}" format in total minutes Mar 23, 2018
…n minutes

- It will consider all the params viz., Year, Month, Day, Hour, Min and Sec
- minor bug fixes

Signed-off-by: Nimesh Patni <nimesh.patni@msystechnologies.com>
Signed-off-by: Nimesh Patni <nimesh.patni@msystechnologies.com>
…skscheduler into nimesh/all_time_in_min

Signed-off-by: Nimesh Patni <nimesh.patni@msystechnologies.com>

# Conflicts Resolved:
#	lib/win32/taskscheduler.rb
Signed-off-by: Nimesh Patni <nimesh.patni@msystechnologies.com>
- Added functionalities to consider leap years also
- Tested with multiple possibilities of time related scenarios given in 'PTM' format

Signed-off-by: Nimesh Patni <nimesh.patni@msystechnologies.com>
Signed-off-by: Nimesh Patni <nimesh.patni@msystechnologies.com>
@Nimesh-Msys Nimesh-Msys changed the title [DoNot Merge] Added methods to convert "PT{HMS}" format in total minutes Helper module to handle date time(in PT Format) related calculations Mar 26, 2018
@Nimesh-Msys
Copy link
Contributor Author

Submitting another PR (#26).
This PR is not required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant