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

  • SEARCH
  • Home
  • 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 6782965
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:48:26+00:00 2026-05-26T16:48:26+00:00

On my join script you have to be 13+ to join. The problem is

  • 0

On my join script you have to be 13+ to join. The problem is when I check it against certain dates it only works if I do it a month back.

    cur_time = datetime.datetime.utcnow() - datetime.timedelta(days=4848.12)
    time_13 = str(cur_time.strftime("%Y-%m-%d"))
    bmonth = self.get_argument('bmonth', '')
    bday = self.get_argument('bday', '')
    byear = self.get_argument('byear', '')
    birthday = byear + '-' + bmonth + '-' + bday
    if time_13 <= birthday:
        c_age = True
    else:
        c_age = ''
    if c_age:
        response = tornado.escape.json_encode({"error":"true","msg":"You must be 13 years of age or older to join uSocial'N"})
  • 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-05-26T16:48:27+00:00Added an answer on May 26, 2026 at 4:48 pm

    It’s better to compare dates and date ranges rather than strings.

    Assuming you get strings for birthday parts:

    bmonth = self.get_argument('bmonth', '')
    bday = self.get_argument('bday', '')
    byear = self.get_argument('byear', '')
    
    bd = datetime.datetime(int(byear), int(bmonth), int(bday))
    min_age = datetime.timedelta(weeks = 52*13)
    if datetime.datetime.now() - bd < min_age:
        response = tornado.escape.json_encode({"error":"true", "msg":
                         "You must be 13 years of age or older to join uSocial'N"})
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following script select c.id from .TBL_COUPONS. as c inner join .TBL_BUSINESS.
i have a problem with python script and javascript script in a website. I
I have a problem with a script timing out while fetching data form a
I have a script to extract certain data from a much bigger table, with
I have a python script that works great when run by itself. Based on
I have a twitter widget on my website. The only problem is, it is
Hi all I have the following SQL Server 2008 script that will check if
I need to join two binary files with a *.bat script on Windows. How
How can you join between a table with a sparse number of dates and
I have a SQL Script that I execute in a job to transform tables

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.