From aaa72c0ac06b8a3c555e5797f31a01a12f96349f Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 22 Jan 2015 16:22:33 +0000 Subject: Centralize the conversion specifications --- libtmdb/tmdb-common.ice | 1 + libtmdb/tmdb-models.ice | 15 +++++---------- 2 files changed, 6 insertions(+), 10 deletions(-) (limited to 'libtmdb') diff --git a/libtmdb/tmdb-common.ice b/libtmdb/tmdb-common.ice index 532d65b..a75c0e1 100644 --- a/libtmdb/tmdb-common.ice +++ b/libtmdb/tmdb-common.ice @@ -2,6 +2,7 @@ #define TMDB_COMMON_ICE module TMDb { + ["slicer:conversion:std.string:stringToDate:dateToString"] struct Date { short Year; short Month; diff --git a/libtmdb/tmdb-models.ice b/libtmdb/tmdb-models.ice index 3368b8d..28d9b58 100644 --- a/libtmdb/tmdb-models.ice +++ b/libtmdb/tmdb-models.ice @@ -46,8 +46,7 @@ module TMDb { ["slicer:name:original_title"] string OriginalTitle; - ["slicer:name:release_date", - "slicer:conversion:std.string:stringToDate:dateToString"] + ["slicer:name:release_date"] Date ReleaseDate; ["slicer:name:poster_path"] @@ -75,8 +74,7 @@ module TMDb { ["slicer:name:original_name"] string OriginalName; - ["slicer:name:first_air_date", - "slicer:conversion:std.string:stringToDate:dateToString"] + ["slicer:name:first_air_date"] Date FirstAirDate; ["slicer:name:poster_path"] @@ -162,8 +160,7 @@ module TMDb { ["slicer:name:production_countries"] CountryRefList ProductionCountries; - ["slicer:name:release_date", - "slicer:conversion:std.string:stringToDate:dateToString"] + ["slicer:name:release_date"] Date ReleaseDate; ["slicer:name:revenue"] @@ -201,8 +198,7 @@ module TMDb { ["slicer:name:episode_run_time"] Runtimes EpisodeRunTimes; - ["slicer:name:first_air_date", - "slicer:conversion:std.string:stringToDate:dateToString"] + ["slicer:name:first_air_date"] Date FirstAirDate; ["slicer:name:genres"] @@ -220,8 +216,7 @@ module TMDb { ["slicer:name:languages"] StringList Languages; - ["slicer:name:last_air_date", - "slicer:conversion:std.string:stringToDate:dateToString"] + ["slicer:name:last_air_date"] Date LastAirDate; ["slicer:name:name"] -- cgit v1.2.3