jsup 2.1 - investor's relief (experiment on separation of investment and SNS)

by joviansummer original STEEMIT post: https://steemit.com/blog/@joviansummer/jsup-2-1-investor-s-relief-experiment-on-separation-of-investment-and-sns Hello, this is @joviansummer(witness: @jswit). I'm starting a new experiment regarding my @jsup vote service. The purpose of this experiment is to separate STEEM investment and social interaction(posting/commenting). For many people, writing a post daily(literally 365 posts per year) is not easy. It's not fun, and mandatory daily post only written for self-voting delegation service tends to result in useless low-quality content. I hope this new function of @jsup will reduce those posts, and also make it a bit more easy to invest in STEEM without worrying about daily posting. I think pressure of daily posting significantly undermines Steem as SNS. It's not fun. This is how it works: From 11:45 PM to 11:50 PM every night(reference time zone is GMT+9), @jsup checks if eligible delegators wrote something and received daily v...

파이썬에서 어제, 오늘, 내일 날짜 구하기

by joviansummer
original STEEMIT post: https://steemit.com/blog/@joviansummer/4yeb8j


파이썬에서 날짜를 구하는 방법입니다. datetime 모듈을 이용합니다.

먼저 오늘 날짜입니다.

import datetime
# 오늘 날짜를 구해서 today에 할당
today = datetime.date.today()
print(today)

2021-06-26

날짜 표시 형식을 지정하고 싶으면 아래와 같이 할 수 있습니다.

print(today.strftime("%Y.%m.%d"))

2021.06.26

어제 또는 내일 날짜는 오늘로부터 하루가 차이나는 값을 구하는 방식으로 계산하며 timedelta()를 활용합니다.

import datetime
from datetime import timedelta
today = datetime.date.today()
# 어제 날짜: 오늘 - 1일
yesterday = today - timedelta(days=1)
print(yesterday)

2021-06-25

# 내일 날짜: 오늘 + 1일
tomorrow = today + timedelta(days=1)
print(tomorrow)

2021-06-27

# 모레 날짜: 오늘 + 2일 
day_after_tomorrow = today + timedelta(days=2)
print(day_after_tomorrow)

2021-06-28

Comments

Popular posts from this blog

스티미언의 영향력 지수 계산

jsup/avle code update - you don't have to write post everyday

jsup/avle 보팅 코드 갱신 - 1일1포스팅 강박에서 벗어나기