altair.TimeLocale#
- 类 altair.TimeLocale(date=Undefined, dateTime=Undefined, days=Undefined, months=Undefined, periods=Undefined, shortDays=Undefined, shortMonths=Undefined, time=Undefined, **kwds)#
TimeLocale 模式包装器。
用于格式化日期和时间的区域设置定义。
- 参数:
- datestr
日期 (%x) 格式说明符(例如,“%m/%d/%Y”)。
- dateTimestr
日期和时间 (%c) 格式说明符(例如,“%a %b %e %X %Y”)。
- daysSequence[str],
Vector7string
工作日的完整名称,从星期日开始。
- monthsSequence[str],
Vector12string
月份的完整名称(从一月开始)。
- periodsSequence[str],
Vector2string
上午和下午的对应名称(例如,[“AM”, “PM”])。
- shortDaysSequence[str],
Vector7string
工作日的缩写名称,从星期日开始。
- shortMonthsSequence[str],
Vector12string
月份的缩写名称(从一月开始)。
- timestr
时间 (%X) 格式说明符(例如,“%H:%M:%S”)。
- __init__(date=Undefined, dateTime=Undefined, days=Undefined, months=Undefined, periods=Undefined, shortDays=Undefined, shortMonths=Undefined, time=Undefined, **kwds)#
方法
__init__
([date, dateTime, days, months, ...])返回对象的副本。
copy
([deep, ignore])从字典表示构造类。
from_dict
(dct[, validate])从有效的 JSON 字符串实例化对象。
from_json
(json_string[, validate])在此对象的模式或根模式上下文中解析引用。
resolve_references
([schema])返回对象的字典表示。
to_dict
([validate, ignore, context])以字符串形式输出此对象的 JSON 表示。
to_json
([validate, indent, sort_keys, ...])在根模式的上下文中根据类模式验证实例。
validate
(instance[, schema])在根模式的上下文中根据属性模式验证属性。
validate_property
(name, value[, schema])