Skip to content

Commit

Permalink
Merge pull request #23 from sat-utils/develop
Browse files Browse the repository at this point in the history
add year,month,day properties
  • Loading branch information
matthewhanson authored Dec 20, 2018
2 parents a112a56 + c5c740d commit 51bf3b2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions satstac/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ def __getitem__(self, key):
def date(self):
return self.datetime.date()

@property
def year(self):
return self.datetime.year()

@property
def month(self):
return self.datetime.month()

@property
def day(self):
return self.datetime.day()

@property
def datetime(self):
return dateparse(self['datetime'])
Expand Down
2 changes: 1 addition & 1 deletion satstac/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.0rc3'
__version__ = '0.1.0rc4'
2 changes: 1 addition & 1 deletion test/test_thing.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_open(self):

def test_open_remote(self):
thing = Thing.open('https://landsat-stac.s3.amazonaws.com/catalog.json')
assert(thing.id == 'landsat')
assert(thing.id == 'landsat-stac')
assert(len(thing.data['links']) == 3)

def test_open_missing_remote(self):
Expand Down

0 comments on commit 51bf3b2

Please sign in to comment.