Attempt to convert to utc-iso time string using date methods.
(obj)
| 310 | |
| 311 | @staticmethod |
| 312 | def encode_as_date(obj): |
| 313 | """Attempt to convert to utc-iso time string using date methods.""" |
| 314 | try: |
| 315 | time_string = obj.isoformat() |
| 316 | except AttributeError: |
| 317 | raise NotEncodable |
| 318 | else: |
| 319 | return iso_to_plotly_time_string(time_string) |
| 320 | |
| 321 | @staticmethod |
| 322 | def encode_as_decimal(obj): |