Skip to content

Commit

Permalink
added isfinite
Browse files Browse the repository at this point in the history
  • Loading branch information
tomi77 committed Oct 21, 2018
1 parent 5ca914c commit 3ee2987
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Table of contents
* `CurrentTimestamp`_
* `DatePart`_
* `DateTrunc`_
* `IsFinite`_

* `HTTP Response`_

Expand Down Expand Up @@ -452,6 +453,11 @@ DateTrunc

Truncate to specified precision

IsFinite
--------

Test for finite date, time stamp, interval (not +/-infinity)


HTTP Response
=============
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""PostgreSQL Date/Time Functions"""
from django.db.models import Func, Value, DateField, DateTimeField, DurationField, FloatField, TimeField
from django.db.models import Func, Value, BooleanField, DateField, DateTimeField, DurationField, FloatField, TimeField


class Age(Func):
Expand Down Expand Up @@ -184,3 +184,9 @@ class DateTrunc(Func):
DECADE = DatePart.DECADE
CENTURY = DatePart.CENTURY
MILLENNIUM = DatePart.MILLENNIUM


class IsFinite(Func):
"""Test for finite date, time stamp, interval (not +/-infinity)"""
function = "ISFINITE"
output_field = BooleanField()

0 comments on commit 3ee2987

Please sign in to comment.