Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8903955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:59:58+00:00 2026-06-15T01:59:58+00:00

I am going through QSTK and in tutorials they use datetime.timedelta I am curios

  • 0

I am going through QSTK and in tutorials they use datetime.timedelta
I am curios what is the purpose of such command in stock related environment. I found some articles on what timedelta is but clearly I am not grasping it since I am clueless what this means:

timeofday= datetime.timedelta(hours=16)
timestamps = du.getNYSEdays(startday,endday,timeofday)

What is a purpose of timedelta as an argument for QSTK or in general.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T02:00:01+00:00Added an answer on June 15, 2026 at 2:00 am

    A timedelta is just an amount of time. In this case, “16 hours”.

    They’re useful because they can be used to manipulate dates and times. Say you’ve got a datetime object that represents “May 21, 2002 at 6am”. If you add your timedelta to that datetime, you’ll get “May 21, 2002 at 10pm”.

    You can also use them to compare datetime objects. If todays_lunch is defined as “11/26/2012 at 12pm” and today's dinner is “11/26/2012 at 6pm”, then you can do:

    >>>todays_dinner - todays_lunch < timeofday
    True
    

    Without more of the code (or maybe just a better understanding of the NYSE than I have), it’s hard to tell what this particular case is doing. But it’s something to do with manipulating datetime objects in 16-hour intervals.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While going through some tutorials, I have encountered lines such as this: ((IDisposable)foo).Dispose(); Ignore
Going through the microsoft authentication tutorial listed here they have you create a master
Going through a tutorial for android (related to multithreading, loopers and handlers), i came
After going through the PyGTK libraries and tutorials, I haven't managed to find an
Going through the tutorial here: http://www.asp.net/mvc/tutorials/iteration-4-make-the-application-loosely-coupled-cs I've noticed that they are passing the EF
Going through some tutorials about sockets, I keep coming across code like that: while(true){
Just going through the starting tutorials, and while I got the app running fine,
After going through some tutorials on asp.net mvc the repository pattern came up and
When going through registration, a lot of sites will disallow the use of symbols
After going through tutorials on getting started with Tortoise I am finally starting to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.