Skip to content

Commit c9c2813

Browse files
committed
Minor fixes and reflow
1 parent 8838389 commit c9c2813

File tree

3 files changed

+37
-25
lines changed

3 files changed

+37
-25
lines changed

doc/Type/DateTime.pod6

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ Defined as:
222222
223223
Returns the time zone in hours as an offset from UTC.
224224
225-
say DateTime.new('2015-12-24T12:23:00+0200').offset-in-hours; # OUTPUT: «2␤»
225+
=for code
226+
say DateTime.new('2015-12-24T12:23:00+0200').offset-in-hours; # OUTPUT: «2␤»
226227
227228
=head2 method Str
228229
@@ -231,10 +232,12 @@ Defined as:
231232
method Str(DateTime:D: --> Str:D)
232233
233234
Returns a string representation of the invocant, as done by
234-
L<the formatter|/type/Dateish#method_formatter>. If no formatter was specified, an
235-
ISO 8601 timestamp will be returned.
235+
L<the formatter|/type/Dateish#method_formatter>.
236+
If no formatter was specified, an ISO 8601 timestamp will be returned.
236237
237-
say DateTime.new('2015-12-24T12:23:00+0200').Str; # OUTPUT: «2015-12-24T12:23:00+02:00␤»
238+
=for code
239+
say DateTime.new('2015-12-24T12:23:00+0200').Str;
240+
# OUTPUT: «2015-12-24T12:23:00+02:00␤»
238241
239242
=head2 method Instant
240243
@@ -258,7 +261,8 @@ Returns the date and time as a POSIX/UNIX timestamp (seconds since the Epoch,
258261
If C<$ignore-timezone> is C<True>, the C<DateTime> object will be treated as if
259262
the timezone offset is zero.
260263
261-
say DateTime.new('2015-12-24T12:23:00Z').posix; # OUTPUT: «1450959780␤»
264+
=for code
265+
say DateTime.new('2015-12-24T12:23:00Z').posix; # OUTPUT: «1450959780␤»
262266
263267
=head2 method later
264268
@@ -281,7 +285,8 @@ the C<later> and C<earlier> methods.
281285
The C<:2nd> form of colonpairs can be used as a compact and self-documenting
282286
way of specifying the delta:
283287
284-
say DateTime.new('2015-12-24T12:23:00Z').later(:2years); # OUTPUT: «2017-12-24T12:23:00Z␤»
288+
say DateTime.new('2015-12-24T12:23:00Z').later(:2years);
289+
# OUTPUT: «2017-12-24T12:23:00Z␤»
285290
286291
Since addition of several different time units is not commutative, only one
287292
unit may be passed.
@@ -297,7 +302,8 @@ actually exists for that time, seconds will be set to C<59>:
297302
say DateTime.new('2008-12-31T23:59:60Z').later: :1day;
298303
# OUTPUT: «2009-01-01T23:59:59Z␤»
299304
300-
Negative offsets are allowed, though L<earlier|/routine/earlier> is more idiomatic for that.
305+
Negative offsets are allowed, though L<earlier|/routine/earlier> is more
306+
idiomatic for that.
301307
302308
=head2 method earlier
303309
@@ -306,8 +312,9 @@ Defined as:
306312
method earlier(DateTime:D: *%unit)
307313
308314
Returns a DateTime object based on the current one, but with a time delta
309-
towards the past applied. Unless the given unit is C<second> or C<seconds>,
310-
the given value will be converted to an L<Int|/type/Int>. See L<#method later> for usage.
315+
towards the past applied. Unless the given unit is C<second> or C<seconds>, the
316+
given value will be converted to an L<Int|/type/Int>. See L<#method later> for
317+
usage.
311318
312319
my $d = DateTime.new(date => Date.new('2015-02-27'));
313320
say $d.earlier(month => 1).earlier(:2days); # OUTPUT: «2015-01-25T00:00:00Z␤»
@@ -349,8 +356,9 @@ Defined as:
349356
350357
Converts the invocant to L«C<Date>|/type/Date».
351358
352-
say DateTime.new("2012-02-29T12:34:56.946314Z").Date; # OUTPUT: «2012-02-29␤»
353-
say DateTime.Date; # OUTPUT: «(Date)␤»
359+
=for code
360+
say DateTime.new("2012-02-29T12:34:56.946314Z").Date; # OUTPUT: «2012-02-29␤»
361+
say DateTime.Date; # OUTPUT: «(Date)␤»
354362
355363
=head2 method DateTime
356364
@@ -360,8 +368,10 @@ Defined as:
360368
361369
Returns the invocant.
362370
363-
say DateTime.new("2012-02-29T12:34:56.946314Z").DateTime; # 2012-02-29T12:34:56.946314Z
364-
say DateTime.DateTime; # OUTPUT: «(DateTime)␤»
371+
say DateTime.new("2012-02-29T12:34:56.946314Z").DateTime;
372+
# OUTPUT: «2012-02-29T12:34:56.946314Z␤»
373+
say DateTime.DateTime;
374+
# OUTPUT: «(DateTime)␤»
365375
366376
=head2 method utc
367377
@@ -371,16 +381,18 @@ Defined as:
371381
372382
Returns a DateTime object for the same time, but in time zone UTC.
373383
374-
say DateTime.new('2015-12-24T12:23:00+0200').utc; # OUTPUT: «2015-12-24T10:23:00Z␤»
384+
say DateTime.new('2015-12-24T12:23:00+0200').utc;
385+
# OUTPUT: «2015-12-24T10:23:00Z␤»
375386
376387
=head2 method in-timezone
377388
378389
Defined as:
379390
380391
method in-timezone(DateTime:D: Int(Cool) $timezone = 0 --> DateTime:D)
381392
382-
Returns a DateTime object for the same time, but in the specified C<$timezone>, which is
383-
the offset B<in seconds> from L<GMT|https://en.wikipedia.org/wiki/Greenwich_Mean_Time>.
393+
Returns a DateTime object for the same time, but in the specified C<$timezone>,
394+
which is the offset B<in seconds> from
395+
L<GMT|https://en.wikipedia.org/wiki/Greenwich_Mean_Time>.
384396
385397
say DateTime.new('2015-12-24T12:23:00Z').in-timezone(3600 + 1800); # OUTPUT: «2015-12-24T13:53:00+0130␤»
386398

doc/Type/IO/Socket/Async.pod6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
C<IO::Socket::Async> provides asynchronous sockets, for both the
1010
server and the client side.
1111
12-
Here is a simple example of a simple "hello world" http server that
12+
Here is a simple example of a simple "hello world" HTTP server that
1313
listens on port 3333:
1414
1515
=begin code :solo
@@ -57,7 +57,7 @@ await IO::Socket::Async.connect('127.0.0.1', 3333).then( -> $promise {
5757
});
5858
=end code
5959
60-
L<IO::Socket::Async> can send and receive
60+
L<IO::Socket::Async> can also send and receive
6161
L<UDP|https://en.wikipedia.org/wiki/User_Datagram_Protocol> messages
6262
An example server that outputs all the data it receives would be:
6363

doc/Type/Str.pod6

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,10 @@ Defined as
605605
606606
multi sub sprintf( Str:D $format, *@args --> Str:D)
607607
608-
This function is mostly identical to the C library C<sprintf> and
609-
C<printf> functions. The only difference between the two
610-
functions is that C<sprintf> returns a string while the C<printf> function
611-
writes to a filehandle. C<sprintf> returns a C<Str>, not a literal.
608+
This function is mostly identical to the C library's C<sprintf> and C<printf>
609+
functions. The only difference between the two functions is that C<sprintf>
610+
returns a string while the C<printf> function writes to a filehandle. C<sprintf>
611+
returns a C<Str>, not a literal.
612612
613613
The C<$format> is scanned for C<%> characters. Any C<%> introduces a
614614
format token. Format tokens have the following grammar:
@@ -624,9 +624,9 @@ format token. Format tokens have the following grammar:
624624
token directive { < % c s d u o x e f g X E G b p n i D U O F > }
625625
}
626626
627-
Directives guide the use (if any) of the arguments. When a directive
628-
(other than C<%>) is used, it indicates how the next argument
629-
passed is to be formatted into the string to be created.
627+
Directives guide the use (if any) of the arguments. When a directive other than
628+
C<%> is used, it indicates how the next argument passed is to be formatted into
629+
the string to be created.
630630
631631
N<The information below is for a fully functioning C<sprintf> implementation
632632
which hasn't been achieved yet. Formats or features not yet implemented are

0 commit comments

Comments
 (0)