Documentation for method whole-second assembled from the following pages:

Class: DateTime §

From DateTime

(DateTime) method whole-second §

Defined as:

method whole-second(DateTime:D:)

Returns the second component, rounded down to an Int.

say DateTime.new('2012-02-29T12:34:56.789Z').whole-second;      # OUTPUT: «56␤»