向 python 日期时间类添加自定义格式化选项
我正在尝试向 python datetime 类添加自定义格式选项,特别是一个将输出季度的 %Q 选项。我假设这可以通过扩展日期时间类来完成,但我不确定如何去做,有什么想法吗?
I'm trying to add custom formatting options to the python datetime class, specifically a %Q option that will output the quarter. I'm assuming this can be done by extending the datetime class but I'm not sure how to go about doing this, any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论