2017-03-29 81 views
0

日期時間我可以從箭頭獲取當前日期時間是這樣的:獲取前一天從箭頭

arrow.utcnow().date() 

arrow.get('2017-02-01').date() 

我怎樣才能得到前一天日期時間?這不起作用:

arrow.utcnow().date() - 1 

arrow.get('2017-02-01').date() - 1 

回答

1

您可以使用替換:

arrow.utcnow().replace(days=-1)