Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Move deprecations along in core.time.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdavis committed Aug 29, 2015
1 parent 0a4d59c commit b9a2777
Showing 1 changed file with 7 additions and 71 deletions.
78 changes: 7 additions & 71 deletions src/core/time.d
Original file line number Diff line number Diff line change
Expand Up @@ -1393,18 +1393,7 @@ public:
}


/++
$(RED Deprecated. Please use $(LREF split) instead. Too frequently,
get or one of the individual unit getters is used when the
function that gave the desired behavior was $(LREF total). This
should make it more explicit and help prevent bugs. This function
will be removed in June 2015.)
Returns the number of the given units in this $(D Duration)
(minus the larger units).
$(D d.get!"minutes"()) is equivalent to $(D d.split().minutes).
+/
// Explicitly undocumented. It will be removed in August 2016. @@@DEPRECATED_2016-08@@@
deprecated("Please use split instead. get was too frequently confused for total.")
long get(string units)() const nothrow @nogc
if(units == "weeks" ||
Expand Down Expand Up @@ -1451,16 +1440,7 @@ public:
}


/++
$(RED Deprecated. Please use $(LREF split) instead. Too frequently,
$(LREF get) or one of the individual unit getters is used when the
function that gave the desired behavior was $(LREF total). This
should make it more explicit and help prevent bugs. This function
will be removed in June 2015.)
Returns the number of weeks in this $(D Duration)
(minus the larger units).
+/
// Explicitly undocumented. It will be removed in August 2016. @@@DEPRECATED_2016-08@@@
deprecated(`Please use split instead. The functions which wrapped get were too frequently confused with total.`)
@property long weeks() const nothrow @nogc
{
Expand All @@ -1484,16 +1464,7 @@ public:
}


/++
$(RED Deprecated. Please use $(LREF split) instead. Too frequently,
$(LREF get) or one of the individual unit getters is used when the
function that gave the desired behavior was $(LREF total). This
should make it more explicit and help prevent bugs. This function
will be removed in June 2015.)
Returns the number of days in this $(D Duration)
(minus the larger units).
+/
// Explicitly undocumented. It will be removed in August 2016. @@@DEPRECATED_2016-08@@@
deprecated(`Please use split instead. days was too frequently confused for total!"days".`)
@property long days() const nothrow @nogc
{
Expand All @@ -1519,16 +1490,7 @@ public:
}


/++
$(RED Deprecated. Please use $(LREF split) instead. Too frequently,
$(LREF get) or one of the individual unit getters is used when the
function that gave the desired behavior was $(LREF total). This
should make it more explicit and help prevent bugs. This function
will be removed in June 2015.)
Returns the number of hours in this $(D Duration)
(minus the larger units).
+/
// Explicitly undocumented. It will be removed in August 2016. @@@DEPRECATED_2016-08@@@
deprecated(`Please use split instead. hours was too frequently confused for total!"hours".`)
@property long hours() const nothrow @nogc
{
Expand All @@ -1554,16 +1516,7 @@ public:
}


/++
$(RED Deprecated. Please use $(LREF split) instead. Too frequently,
$(LREF get) or one of the individual unit getters is used when the
function that gave the desired behavior was $(LREF total). This
should make it more explicit and help prevent bugs. This function
will be removed in June 2015.)
Returns the number of minutes in this $(D Duration)
(minus the larger units).
+/
// Explicitly undocumented. It will be removed in August 2016. @@@DEPRECATED_2016-08@@@
deprecated(`Please use split instead. minutes was too frequently confused for total!"minutes".`)
@property long minutes() const nothrow @nogc
{
Expand All @@ -1589,16 +1542,7 @@ public:
}


/++
$(RED Deprecated. Please use $(LREF split) instead. Too frequently,
$(LREF get) or one of the individual unit getters is used when the
function that gave the desired behavior was $(LREF total). This
should make it more explicit and help prevent bugs. This function
will be removed in June 2015.)
Returns the number of seconds in this $(D Duration)
(minus the larger units).
+/
// Explicitly undocumented. It will be removed in August 2016. @@@DEPRECATED_2016-08@@@
deprecated(`Please use split instead. seconds was too frequently confused for total!"seconds".`)
@property long seconds() const nothrow @nogc
{
Expand All @@ -1624,15 +1568,7 @@ public:
}


/++
$(RED Deprecated. Please use $(LREF split) instead. Too frequently,
$(LREF get) or one of the individual unit getters is used when the
function that gave the desired behavior was $(LREF total). This
should make it more explicit and help prevent bugs. This function
will be removed in June 2015.)
Returns the fractional seconds past the second in this $(D Duration).
+/
// Explicitly undocumented. It will be removed in August 2016. @@@DEPRECATED_2016-08@@@
deprecated(`Please use split instead.`)
@property FracSec fracSec() const nothrow
{
Expand Down

0 comments on commit b9a2777

Please sign in to comment.