콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
1023 화면

how can i calculate days of year

아바타
취소
베스트 답변

Maybe you can spend more time on being more specific when asking questions.
If you want to calculate the number of days of the current year in python, you can always:
- import calendar then check if calendar.isleap(year), if yes then 366 else 365
- check the days_in_years of the last day of the year which is always 31 Dec. (Or check the day before 1st of march to see if it is 28 or 29 of Feb)
If you want to check the days of year of today. you can use odoo's fields.Date.context_today.
But if you want to calculate it in qweb report, or javascript, it's another story.


아바타
취소
관련 게시물 답글 화면 활동
0
6월 25
19
1
5월 25
857
0
3월 25
36
0
3월 25
646
1
2월 25
886