mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
force AM/PM to uppercase in date parser
This commit is contained in:
@ -1,5 +1,8 @@
|
|||||||
jc changelog
|
jc changelog
|
||||||
|
|
||||||
|
20220305 v1.18.5
|
||||||
|
- Fix date parser to ensure AM/PM period string is always uppercase
|
||||||
|
|
||||||
20220304 v1.18.4
|
20220304 v1.18.4
|
||||||
- Add nmcli command parser tested on linux
|
- Add nmcli command parser tested on linux
|
||||||
- Enhance parse error messages at the cli
|
- Enhance parse error messages at the cli
|
||||||
|
@ -9,7 +9,7 @@ import importlib
|
|||||||
from typing import Dict, List, Iterable, Union, Iterator
|
from typing import Dict, List, Iterable, Union, Iterator
|
||||||
from jc import appdirs
|
from jc import appdirs
|
||||||
|
|
||||||
__version__ = '1.18.4'
|
__version__ = '1.18.5'
|
||||||
|
|
||||||
parsers = [
|
parsers = [
|
||||||
'acpi',
|
'acpi',
|
||||||
|
@ -83,7 +83,7 @@ import jc.utils
|
|||||||
|
|
||||||
class info():
|
class info():
|
||||||
"""Provides parser metadata (version, author, etc.)"""
|
"""Provides parser metadata (version, author, etc.)"""
|
||||||
version = '2.3'
|
version = '2.4'
|
||||||
description = '`date` command parser'
|
description = '`date` command parser'
|
||||||
author = 'Kelly Brazil'
|
author = 'Kelly Brazil'
|
||||||
author_email = 'kellyjonbrazil@gmail.com'
|
author_email = 'kellyjonbrazil@gmail.com'
|
||||||
@ -188,7 +188,7 @@ def parse(data, raw=False, quiet=False):
|
|||||||
'hour_24': dt.hour,
|
'hour_24': dt.hour,
|
||||||
'minute': dt.minute,
|
'minute': dt.minute,
|
||||||
'second': dt.second,
|
'second': dt.second,
|
||||||
'period': dt.strftime('%p'),
|
'period': dt.strftime('%p').upper(),
|
||||||
'timezone': tz,
|
'timezone': tz,
|
||||||
'utc_offset': dt.strftime('%z') or None,
|
'utc_offset': dt.strftime('%z') or None,
|
||||||
'day_of_year': int(dt.strftime('%j')),
|
'day_of_year': int(dt.strftime('%j')),
|
||||||
|
2
setup.py
2
setup.py
@ -5,7 +5,7 @@ with open('README.md', 'r') as f:
|
|||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name='jc',
|
name='jc',
|
||||||
version='1.18.4',
|
version='1.18.5',
|
||||||
author='Kelly Brazil',
|
author='Kelly Brazil',
|
||||||
author_email='kellyjonbrazil@gmail.com',
|
author_email='kellyjonbrazil@gmail.com',
|
||||||
description='Converts the output of popular command-line tools and file-types to JSON.',
|
description='Converts the output of popular command-line tools and file-types to JSON.',
|
||||||
|
Reference in New Issue
Block a user