本文整理汇总了Python中common.Common.std_date方法的典型用法代码示例。如果您正苦于以下问题:Python Common.std_date方法的具体用法?Python Common.std_date怎么用?Python Common.std_date使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common.Common
的用法示例。
在下文中一共展示了Common.std_date方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_std_date_modality_string
# 需要导入模块: from common import Common [as 别名]
# 或者: from common.Common import std_date [as 别名]
def test_std_date_modality_string(self):
input_value = '1989 troligen'
expected = '1989 {{Probably}}'
self.assertEquals(Common.std_date(input_value), expected)
示例2: test_std_date_start_string
# 需要导入模块: from common import Common [as 别名]
# 或者: from common.Common import std_date [as 别名]
def test_std_date_start_string(self):
input_value = u'hösten 1983'
expected = '{{other date|fall|1983}}'
self.assertEquals(Common.std_date(input_value), expected)
示例3: test_std_date_ending_string
# 需要导入模块: from common import Common [as 别名]
# 或者: from common.Common import std_date [as 别名]
def test_std_date_ending_string(self):
input_value = '1700-talets mitt'
expected = '{{other date|mid|{{other date|century|18}}}}'
self.assertEquals(Common.std_date(input_value), expected)
示例4: test_std_date_low_century_string
# 需要导入模块: from common import Common [as 别名]
# 或者: from common.Common import std_date [as 别名]
def test_std_date_low_century_string(self):
input_value = '700-talet'
expected = '{{other date|century|8}}'
self.assertEquals(Common.std_date(input_value), expected)
示例5: test_std_date_century_range_string
# 需要导入模块: from common import Common [as 别名]
# 或者: from common.Common import std_date [as 别名]
def test_std_date_century_range_string(self):
input_value = '1700-1800-talet'
expected = '{{other date|-' \
'|{{other date|century|18}}' \
'|{{other date|century|19}}}}'
self.assertEquals(Common.std_date(input_value), expected)
示例6: test_std_date_multiple_iso_string
# 需要导入模块: from common import Common [as 别名]
# 或者: from common.Common import std_date [as 别名]
def test_std_date_multiple_iso_string(self):
input_value = '1989-02-04;1984'
expected = '1989-02-04; 1984'
self.assertEquals(Common.std_date(input_value), expected)
示例7: test_std_date_decade_string
# 需要导入模块: from common import Common [as 别名]
# 或者: from common.Common import std_date [as 别名]
def test_std_date_decade_string(self):
input_value = '1980-talet'
expected = '{{other date|decade|1980}}'
self.assertEquals(Common.std_date(input_value), expected)
示例8: test_std_date_open_range_string_after
# 需要导入模块: from common import Common [as 别名]
# 或者: from common.Common import std_date [as 别名]
def test_std_date_open_range_string_after(self):
input_value = '1989-'
expected = '{{other date|>|1989}}'
self.assertEquals(Common.std_date(input_value), expected)
示例9: test_std_date_open_range_string_before
# 需要导入模块: from common import Common [as 别名]
# 或者: from common.Common import std_date [as 别名]
def test_std_date_open_range_string_before(self):
input_value = '-1989'
expected = '{{other date|<|1989}}'
self.assertEquals(Common.std_date(input_value), expected)
示例10: test_std_date_compact_range_string
# 需要导入模块: from common import Common [as 别名]
# 或者: from common.Common import std_date [as 别名]
def test_std_date_compact_range_string(self):
input_value = '1989-90'
expected = '{{other date|-|1989|1990}}'
self.assertEquals(Common.std_date(input_value), expected)
示例11: test_std_date_y_iso_string
# 需要导入模块: from common import Common [as 别名]
# 或者: from common.Common import std_date [as 别名]
def test_std_date_y_iso_string(self):
input_value = '1989'
expected = '1989'
self.assertEquals(Common.std_date(input_value), expected)
示例12: test_std_date_bad_date_returns_none
# 需要导入模块: from common import Common [as 别名]
# 或者: from common.Common import std_date [as 别名]
def test_std_date_bad_date_returns_none(self):
input_value = 'bad date'
expected = None
self.assertEquals(Common.std_date(input_value), expected)
示例13: test_std_date_nd_string_returns_empty_string
# 需要导入模块: from common import Common [as 别名]
# 或者: from common.Common import std_date [as 别名]
def test_std_date_nd_string_returns_empty_string(self):
input_value = 'n.d'
self.assertEquals(Common.std_date(input_value), '')
示例14: test_std_date_on_empty_string_returns_empty_string
# 需要导入模块: from common import Common [as 别名]
# 或者: from common.Common import std_date [as 别名]
def test_std_date_on_empty_string_returns_empty_string(self):
self.assertEquals(Common.std_date(''), '')