moment 日期时间
moment简介
moment,Python第三方库,用于处理日期时间,灵感来自Moment.js和Kenneth Reitz的请求库。
moment应用实例
import moment
from datetime import datetime
# Create a moment from a string
moment.date("12-18-2012")
# Create a moment with a specified strftime format
moment.date("12-18-2012", "%m-%d-%Y")
# Moment uses the awesome dateparser library behind the scenes
moment.date("2012-12-18")
# Create a moment with words in it
moment.date("December 18, 2012")
# Create a moment that would normally be pretty hard to do
moment.date("2 weeks ago")
moment Github统计数据
MIT license(数据来源:pypi)
Github 721 stars
moment安装命令
pip install moment
免责声明:内容编辑自网络,仅供参考,不保证正确性,不作任何决策依据!!以上数据皆截止于博文的写稿日期。