일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- Python
- PySpark
- Java
- hive
- Google Excel
- Google Spreadsheet
- numpy
- google apps script
- Kotlin
- math
- dataframe
- list
- Excel
- 파이썬
- django
- string
- matplotlib
- Tkinter
- GIT
- SQL
- Github
- gas
- array
- c#
- Mac
- PANDAS
- Apache
- PostgreSQL
- Redshift
- Today
- Total
목록요일 (2)
달나라 노트

getDay() method는 특정 날짜의 요일을 요일 번호로 return해줍니다. Syntax Date.getDay() 사용법은 위와 같습니다. Date 객체에 getDay() method를 적용하면 됩니다. function myFunction() { var today_dt = new Date(); var today_weekday = today_dt.getDay(); Logger.log(today_dt); Logger.log(today_weekday); } - var today_dt = new Date(); new Date()로 현재 날짜와 시간을 얻어옵니다. - var today_weekday = today_dt.getDay(); 오늘 날짜/시간을 담고있는 today_dt 변수에 getDay() me..
import datetime print(datetime.datetime.now()) print(datetime.datetime.now().weekday()) print(datetime.datetime.now().isoweekday()) -- Result 2021-03-27 01:27:32.470639 5 6 datetime 자료형에 weekday, isoweekday method를 적용시켜 요일 번호를 받아낼 수 있습니다. 각 method 별로 각 번호가 무슨 요일을 해당하는지는 아래 표를 보시면 됩니다. weekday isoweekday Mon 0 1 Tue 1 2 Wed 2 3 Thu 3 4 Fri 4 5 Sat 5 6 Sun 6 7