From e96d86df690b5e4c6020d115d224b7b3b185e7cd Mon Sep 17 00:00:00 2001 From: Bernd Homuth Date: Sat, 24 Nov 2012 10:32:49 +0100 Subject: [PATCH] language fixes in time.c --- time.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/time.c b/time.c index fbae712..426db16 100644 --- a/time.c +++ b/time.c @@ -1399,12 +1399,12 @@ gmtimew(wideval_t timew, struct vtm *result) static struct tm *localtime_with_gmtoff_zone(const time_t *t, struct tm *result, long *gmtoff, const char **zone); /* - * The idea is come from Perl: + * The idea is borrowed from Perl: * http://use.perl.org/articles/08/02/07/197204.shtml * - * compat_common_month_table is generated by following program. - * This table finds the last month which start the same day of a week. - * The year 2037 is not used because + * compat_common_month_table is generated by the following program. + * This table finds the last month which starts at the same day of a week. + * The year 2037 is not used because: * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522949 * * #!/usr/bin/ruby @@ -1502,8 +1502,8 @@ guess_local_offset(struct vtm *vtm_utc, int *isdst_ret, const char **zone_ret) VALUE timev; int y, wday; - /* The first DST is at 1916 in German. - * So we don't need to care DST before that. */ + /* Daylight Saving Time was introduced in 1916. + * So we don't need to care about DST before that. */ if (lt(vtm_utc->year, INT2FIX(1916))) { VALUE off = INT2FIX(0); int isdst = 0; @@ -1537,7 +1537,7 @@ guess_local_offset(struct vtm *vtm_utc, int *isdst_ret, const char **zone_ret) return off; } - /* It is difficult to guess future. */ + /* It is difficult to guess the future. */ vtm2 = *vtm_utc; @@ -2232,7 +2232,7 @@ time_init_1(int argc, VALUE *argv, VALUE time) * _sec_ may have fraction if it is a rational. * * _utc_offset_ is the offset from UTC. - * It is a string such as "+09:00" or a number of seconds such as 32400. + * It can be a string such as "+09:00" or a number of seconds such as 32400. * * a = Time.new #=> 2007-11-19 07:50:02 -0600 * b = Time.new #=> 2007-11-19 07:50:02 -0600 @@ -3202,7 +3202,7 @@ time_to_i(VALUE time) * t.to_i #=> 1270968744 * * Note that IEEE 754 double is not accurate enough to represent - * number of nanoseconds from the Epoch. + * the number of nanoseconds since the Epoch. */ static VALUE @@ -4448,7 +4448,7 @@ strftimev(const char *fmt, VALUE time, rb_encoding *enc) * %z - Time zone as hour and minute offset from UTC (e.g. +0900) * %:z - hour and minute offset from UTC with a colon (e.g. +09:00) * %::z - hour, minute and second offset from UTC (e.g. +09:00:00) - * %Z - Time zone abbreviation name or something similar information. + * %Z - Abbreviated time zone name or similar information. * * Weekday: * %A - The full weekday name (``Sunday'') @@ -4459,7 +4459,7 @@ strftimev(const char *fmt, VALUE time, rb_encoding *enc) * %w - Day of the week (Sunday is 0, 0..6) * * ISO 8601 week-based year and week number: - * The week 1 of YYYY starts with a Monday and includes YYYY-01-04. + * The first week of YYYY starts with a Monday and includes YYYY-01-04. * The days in the year before the first week are in the last week of * the previous year. * %G - The week-based year @@ -4467,10 +4467,10 @@ strftimev(const char *fmt, VALUE time, rb_encoding *enc) * %V - Week number of the week-based year (01..53) * * Week number: - * The week 1 of YYYY starts with a Sunday or Monday (according to %U - * or %W). The days in the year before the first week are in week 0. - * %U - Week number of the year. The week starts with Sunday. (00..53) - * %W - Week number of the year. The week starts with Monday. (00..53) + * The first week of YYYY that starts with a Sunday or Monday (according to %U + * or %W). The days in the year before the first week are in week 0. + * %U - Week number of the year. The week starts with Sunday. (00..53) + * %W - Week number of the year. The week starts with Monday. (00..53) * * Seconds since the Epoch: * %s - Number of seconds since 1970-01-01 00:00:00 UTC. @@ -4930,7 +4930,7 @@ time_load(VALUE klass, VALUE str) * * t + (60*60*24*365) #=> 1994-02-24 12:00:00 +0900 * - * How many second was that from the Unix Epoch? + * How many seconds was that since the Unix Epoch? * * t.to_i #=> 730522800 * -- 1.7.11.1