Преглед на файлове

Updated manpage and fixed bugs

pull/75/head
brain_face преди 5 години
родител
ревизия
fda918f211
променени са 3 файла, в които са добавени 4 реда и са изтрити 4 реда
  1. +1
    -1
      Pipfile
  2. +2
    -2
      kosmorrolib/main.py
  3. +1
    -1
      manpage/kosmorro.1.md

+ 1
- 1
Pipfile Целия файл

@@ -16,7 +16,7 @@ tabulate = "*"
numpy = ">=1.17.0,<2.0.0"
termcolor = "*"
latex = "*"
dateutil = ">=2.8.1"
dateutil = "*"

[requires]
python_version = "3"

+ 2
- 2
kosmorrolib/main.py Целия файл

@@ -109,7 +109,7 @@ def get_date(date_arg: str) -> date:
elif re.match(r'^([+-])(([0-9]+)y)?[ ]?(([0-9]+)m)?[ ]?(([0-9]+)d)?$', date_arg):
def get_offset(date_arg: str, signifier: str):
if re.search(r'([0-9]+)' + signifier, date_arg):
return int(re.search(r'[+-]?([0-9]+)' + signifier, date_arg).group(0)[:-1])
return abs(int(re.search(r'[+-]?([0-9]+)' + signifier, date_arg).group(0)[:-1]))
else:
return 0

@@ -124,7 +124,7 @@ def get_date(date_arg: str) -> date:
return date.today() - relativedelta(days=days, months=months, years=years)

else:
raise ValueError(_('The date {date} does not match the required YYYY-MM-DD format or the offset format.').format(date=date_arg))
raise ValueError(_('The date {date} does not match the YYYY-MM-DD format or the relativedate format.').format(date=date_arg))





+ 1
- 1
manpage/kosmorro.1.md Целия файл

@@ -23,7 +23,7 @@
the observer's longitude on Earth

`--date=`_DATE_, `-d` _DATE_
The date for which the ephemerides must be computed (in the YYYY-MM-DD format); defaults to the current date
The date for which the ephemerides must be computed, either in in the YYYY-MM-DD format or as an interval formatted like [+-]YyMmDd; defaults to the current date

`--timezone=`_TIMEZONE_, `-t` _TIMEZONE_
the timezone to display the hours in; e.g. 2 for UTC+2 or -3 for UTC-3


Зареждане…
Отказ
Запис