INNER CODE UNIT · Python

ts

Shra1V32/Playlist-AutoUpdater · validate_git.py:23

    ts = (datetime.datetime.fromtimestamp(int(current_date)) -
          datetime.datetime(int(u_year), int(u_month), int(u_day), int(u_hours), int(u_minutes), int(u_seconds))).total_seconds()
    if int(ts) < 604800:
        remaining_hrs = 24 - (int((int(ts) % 86400)/3600))
        remaining_days = 7 - int(ts/86400)
        remaining_mins = 60 - (int((int(ts) % 86400)/60)) % 60
        print(
            f"\033[0;31mYour GitHub account is too new to run this script, Please come back after {remaining_days} days, {remaining_hrs} hrs and {remaining_mins} minutes.\033[0m")
        raise PeriodNotCompleted
else:
    print("No arguments passed")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…