Skip to content

get_coord doesnt take datetime objects #467

@d-chambers

Description

@d-chambers

Description

I noticed that dascore.core.get_coord doesn't currently accept datetime.datetime objects as inputs to start, stop, etc.

Example

The following doesn't work.

import datetime
from dascore.core import get_coord

d1 = datetime.datetime.from_isoformat("2017-09-18T01")
d2 = datetime.datetime.from_isoformat("2017-09-18T02")

coord = get_coord(start=d1, stop=d2, step=60)

Expected behavior

I would expect get_coord to determine this is a time-like input and convert it.

Versions

  • OS [e.g. Ubuntu 20.04]:
  • DasCore Version [e.g. 0.0.5]:
  • Python Version [e.g. 3.10]:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions