[Groonga-commit] groonga/groonga at bab286e [master] time_classify_day_of_week: remove "the"

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Jul 3 17:22:24 JST 2018


Kouhei Sutou	2018-07-03 17:22:24 +0900 (Tue, 03 Jul 2018)

  New Revision: bab286e6788302acceccdf4785b9ea05717027c0
  https://github.com/groonga/groonga/commit/bab286e6788302acceccdf4785b9ea05717027c0

  Message:
    time_classify_day_of_week: remove "the"
    
    Because C# and Java don't use "the".

  Modified files:
    doc/files.am
    plugins/functions/time.c
  Renamed files:
    doc/source/example/reference/functions/time_classify_day_of_week/usage_classify.log
      (from doc/source/example/reference/functions/time_classify_day_of_the_week/usage_classify.log)
    doc/source/example/reference/functions/time_classify_day_of_week/usage_register.log
      (from doc/source/example/reference/functions/time_classify_day_of_the_week/usage_register.log)
    doc/source/example/reference/functions/time_classify_day_of_week/usage_setup_data.log
      (from doc/source/example/reference/functions/time_classify_day_of_the_week/usage_setup_data.log)
    doc/source/example/reference/functions/time_classify_day_of_week/usage_setup_schema.log
      (from doc/source/example/reference/functions/time_classify_day_of_the_week/usage_setup_schema.log)
    doc/source/reference/functions/time_classify_day_of_week.rst
      (from doc/source/reference/functions/time_classify_day_of_the_week.rst)
    test/command/suite/select/function/time/time_classify_day_of_week/valid.expected
      (from test/command/suite/select/function/time/time_classify_day_of_the_week/valid.expected)
    test/command/suite/select/function/time/time_classify_day_of_week/valid.test
      (from test/command/suite/select/function/time/time_classify_day_of_the_week/valid.test)

  Modified: doc/files.am (+11 -11)
===================================================================
--- doc/files.am    2018-07-03 09:43:25 +0900 (72e3f42d9)
+++ doc/files.am    2018-07-03 17:22:24 +0900 (0955c1901)
@@ -428,10 +428,10 @@ absolute_source_files = \
 	$(top_srcdir)/doc/source/example/reference/functions/sub_filter/usage_setup_schema.log \
 	$(top_srcdir)/doc/source/example/reference/functions/sub_filter/usage_with_sub_filter.log \
 	$(top_srcdir)/doc/source/example/reference/functions/sub_filter/usage_without_sub_filter.log \
-	$(top_srcdir)/doc/source/example/reference/functions/time_classify_day_of_the_week/usage_classify.log \
-	$(top_srcdir)/doc/source/example/reference/functions/time_classify_day_of_the_week/usage_register.log \
-	$(top_srcdir)/doc/source/example/reference/functions/time_classify_day_of_the_week/usage_setup_data.log \
-	$(top_srcdir)/doc/source/example/reference/functions/time_classify_day_of_the_week/usage_setup_schema.log \
+	$(top_srcdir)/doc/source/example/reference/functions/time_classify_day_of_week/usage_classify.log \
+	$(top_srcdir)/doc/source/example/reference/functions/time_classify_day_of_week/usage_register.log \
+	$(top_srcdir)/doc/source/example/reference/functions/time_classify_day_of_week/usage_setup_data.log \
+	$(top_srcdir)/doc/source/example/reference/functions/time_classify_day_of_week/usage_setup_schema.log \
 	$(top_srcdir)/doc/source/example/reference/functions/vector_find/usage_find.log \
 	$(top_srcdir)/doc/source/example/reference/functions/vector_find/usage_find_mode.log \
 	$(top_srcdir)/doc/source/example/reference/functions/vector_find/usage_register.log \
@@ -892,7 +892,7 @@ absolute_source_files = \
 	$(top_srcdir)/doc/source/reference/functions/string_substring.rst \
 	$(top_srcdir)/doc/source/reference/functions/sub_filter.rst \
 	$(top_srcdir)/doc/source/reference/functions/time_classify_day.rst \
-	$(top_srcdir)/doc/source/reference/functions/time_classify_day_of_the_week.rst \
+	$(top_srcdir)/doc/source/reference/functions/time_classify_day_of_week.rst \
 	$(top_srcdir)/doc/source/reference/functions/time_classify_hour.rst \
 	$(top_srcdir)/doc/source/reference/functions/time_classify_minute.rst \
 	$(top_srcdir)/doc/source/reference/functions/time_classify_month.rst \
@@ -1406,10 +1406,10 @@ source_files_relative_from_doc_dir = \
 	source/example/reference/functions/sub_filter/usage_setup_schema.log \
 	source/example/reference/functions/sub_filter/usage_with_sub_filter.log \
 	source/example/reference/functions/sub_filter/usage_without_sub_filter.log \
-	source/example/reference/functions/time_classify_day_of_the_week/usage_classify.log \
-	source/example/reference/functions/time_classify_day_of_the_week/usage_register.log \
-	source/example/reference/functions/time_classify_day_of_the_week/usage_setup_data.log \
-	source/example/reference/functions/time_classify_day_of_the_week/usage_setup_schema.log \
+	source/example/reference/functions/time_classify_day_of_week/usage_classify.log \
+	source/example/reference/functions/time_classify_day_of_week/usage_register.log \
+	source/example/reference/functions/time_classify_day_of_week/usage_setup_data.log \
+	source/example/reference/functions/time_classify_day_of_week/usage_setup_schema.log \
 	source/example/reference/functions/vector_find/usage_find.log \
 	source/example/reference/functions/vector_find/usage_find_mode.log \
 	source/example/reference/functions/vector_find/usage_register.log \
@@ -1870,7 +1870,7 @@ source_files_relative_from_doc_dir = \
 	source/reference/functions/string_substring.rst \
 	source/reference/functions/sub_filter.rst \
 	source/reference/functions/time_classify_day.rst \
-	source/reference/functions/time_classify_day_of_the_week.rst \
+	source/reference/functions/time_classify_day_of_week.rst \
 	source/reference/functions/time_classify_hour.rst \
 	source/reference/functions/time_classify_minute.rst \
 	source/reference/functions/time_classify_month.rst \
@@ -2277,7 +2277,7 @@ html_files_relative_from_locale_dir = \
 	html/reference/functions/string_substring.html \
 	html/reference/functions/sub_filter.html \
 	html/reference/functions/time_classify_day.html \
-	html/reference/functions/time_classify_day_of_the_week.html \
+	html/reference/functions/time_classify_day_of_week.html \
 	html/reference/functions/time_classify_hour.html \
 	html/reference/functions/time_classify_minute.html \
 	html/reference/functions/time_classify_month.html \

  Renamed: doc/source/example/reference/functions/time_classify_day_of_week/usage_classify.log (+2 -2) 87%
===================================================================
--- doc/source/example/reference/functions/time_classify_day_of_the_week/usage_classify.log    2018-07-03 09:43:25 +0900 (bb4dbbbc5)
+++ doc/source/example/reference/functions/time_classify_day_of_week/usage_classify.log    2018-07-03 17:22:24 +0900 (2928e8c78)
@@ -2,7 +2,7 @@ Execution example::
 
   select \
     --table Memos \
-    --output_columns '_key, time_classify_day_of_the_week(created_at)'
+    --output_columns '_key, time_classify_day_of_week(created_at)'
   # [
   #   [
   #     0, 
@@ -20,7 +20,7 @@ Execution example::
   #           "ShortText"
   #         ], 
   #         [
-  #           "time_classify_day_of_the_week", 
+  #           "time_classify_day_of_week", 
   #           null
   #         ]
   #       ], 

  Renamed: doc/source/example/reference/functions/time_classify_day_of_week/usage_register.log (+0 -0) 100%
===================================================================

  Renamed: doc/source/example/reference/functions/time_classify_day_of_week/usage_setup_data.log (+0 -0) 100%
===================================================================

  Renamed: doc/source/example/reference/functions/time_classify_day_of_week/usage_setup_schema.log (+0 -0) 100%
===================================================================

  Renamed: doc/source/reference/functions/time_classify_day_of_week.rst (+10 -10) 82%
===================================================================
--- doc/source/reference/functions/time_classify_day_of_the_week.rst    2018-07-03 09:43:25 +0900 (29152045e)
+++ doc/source/reference/functions/time_classify_day_of_week.rst    2018-07-03 17:22:24 +0900 (9e58ca353)
@@ -3,10 +3,10 @@
 .. highlightlang:: none
 
 .. groonga-command
-.. database: functions_time_classify_day_of_the_week
+.. database: functions_time_classify_day_of_week
 
-``time_classify_day_of_the_week``
-=================================
+``time_classify_day_of_week``
+=============================
 
 Summary
 -------
@@ -28,7 +28,7 @@ Syntax
 
 This function has only one parameter::
 
-  time_classify_day_of_the_week(time)
+  time_classify_day_of_week(time)
 
 Usage
 -----
@@ -36,7 +36,7 @@ Usage
 You need to register ``functions/time`` plugin at first:
 
 .. groonga-command
-.. include:: ../../example/reference/functions/time_classify_day_of_the_week/usage_register.log
+.. include:: ../../example/reference/functions/time_classify_day_of_week/usage_register.log
 .. plugin_register functions/time
 
 Here is a schema definition and sample data.
@@ -44,14 +44,14 @@ Here is a schema definition and sample data.
 Sample schema:
 
 .. groonga-command
-.. include:: ../../example/reference/functions/time_classify_day_of_the_week/usage_setup_schema.log
+.. include:: ../../example/reference/functions/time_classify_day_of_week/usage_setup_schema.log
 .. table_create  Memos TABLE_HASH_KEY ShortText
 .. column_create Memos created_at COLUMN_SCALAR Time
 
 Sample data:
 
 .. groonga-command
-.. include:: ../../example/reference/functions/time_classify_day_of_the_week/usage_setup_data.log
+.. include:: ../../example/reference/functions/time_classify_day_of_week/usage_setup_data.log
 .. load --table Memos
 .. [
 .. {"_key": "Sunday",    "created_at": "2018-07-01 00:00:00"},
@@ -63,13 +63,13 @@ Sample data:
 .. {"_key": "Saturday",  "created_at": "2018-07-07 00:00:00"}
 .. ]
 
-Here is a simple usage of ``time_classify_day_of_the_week``:
+Here is a simple usage of ``time_classify_day_of_week``:
 
 .. groonga-command
-.. include:: ../../example/reference/functions/time_classify_day_of_the_week/usage_classify.log
+.. include:: ../../example/reference/functions/time_classify_day_of_week/usage_classify.log
 .. select \
 ..   --table Memos \
-..   --output_columns '_key, time_classify_day_of_the_week(created_at)'
+..   --output_columns '_key, time_classify_day_of_week(created_at)'
 
 It returns ``0`` for Sunday, ``1`` for Monday, ... and ``6`` for
 Saturday.

  Modified: plugins/functions/time.c (+13 -13)
===================================================================
--- plugins/functions/time.c    2018-07-03 09:43:25 +0900 (3722e879f)
+++ plugins/functions/time.c    2018-07-03 17:22:24 +0900 (9d36c4ded)
@@ -326,10 +326,10 @@ func_time_classify_year(grn_ctx *ctx, int n_args, grn_obj **args,
 }
 
 static grn_obj *
-func_time_classify_day_of_the_week(grn_ctx *ctx, int n_args, grn_obj **args,
-                                   grn_user_data *user_data)
+func_time_classify_day_of_week(grn_ctx *ctx, int n_args, grn_obj **args,
+                               grn_user_data *user_data)
 {
-  const char *function_name = "time_classify_day_of_the_week";
+  const char *function_name = "time_classify_day_of_week";
   grn_obj *time;
 
   if (n_args != 1) {
@@ -362,23 +362,23 @@ func_time_classify_day_of_the_week(grn_ctx *ctx, int n_args, grn_obj **args,
   {
     int64_t time_raw;
     struct tm tm;
-    grn_obj *day_of_the_week;
+    grn_obj *day_of_week;
 
     time_raw = GRN_TIME_VALUE(time);
     if (!grn_time_to_tm(ctx, time_raw, &tm)) {
       return NULL;
     }
 
-    day_of_the_week = grn_plugin_proc_alloc(ctx,
-                                            user_data,
-                                            GRN_DB_UINT8,
-                                            0);
-    if (!day_of_the_week) {
+    day_of_week = grn_plugin_proc_alloc(ctx,
+                                        user_data,
+                                        GRN_DB_UINT8,
+                                        0);
+    if (!day_of_week) {
       return NULL;
     }
-    GRN_UINT8_SET(ctx, day_of_the_week, tm.tm_wday);
+    GRN_UINT8_SET(ctx, day_of_week, tm.tm_wday);
 
-    return day_of_the_week;
+    return day_of_week;
   }
 }
 
@@ -596,9 +596,9 @@ GRN_PLUGIN_REGISTER(grn_ctx *ctx)
                   func_time_classify_year,
                   NULL, NULL, 0, NULL);
   grn_proc_create(ctx,
-                  "time_classify_day_of_the_week", -1,
+                  "time_classify_day_of_week", -1,
                   GRN_PROC_FUNCTION,
-                  func_time_classify_day_of_the_week,
+                  func_time_classify_day_of_week,
                   NULL, NULL, 0, NULL);
 
   grn_proc_create(ctx,

  Renamed: test/command/suite/select/function/time/time_classify_day_of_week/valid.expected (+2 -2) 91%
===================================================================
--- test/command/suite/select/function/time/time_classify_day_of_the_week/valid.expected    2018-07-03 09:43:25 +0900 (e1816ed94)
+++ test/command/suite/select/function/time/time_classify_day_of_week/valid.expected    2018-07-03 17:22:24 +0900 (55f5d7f53)
@@ -12,7 +12,7 @@ load --table Timestamps
 {"_key": "2016-05-08 00:00:00.000000"}
 ]
 [[0,0.0,0.0],6]
-select Timestamps   --sortby _id   --limit -1   --output_columns '_key, time_classify_day_of_the_week(_key)'
+select Timestamps   --sortby _id   --limit -1   --output_columns '_key, time_classify_day_of_week(_key)'
 [
   [
     0,
@@ -30,7 +30,7 @@ select Timestamps   --sortby _id   --limit -1   --output_columns '_key, time_cla
           "Time"
         ],
         [
-          "time_classify_day_of_the_week",
+          "time_classify_day_of_week",
           null
         ]
       ],

  Renamed: test/command/suite/select/function/time/time_classify_day_of_week/valid.test (+1 -1) 86%
===================================================================
--- test/command/suite/select/function/time/time_classify_day_of_the_week/valid.test    2018-07-03 09:43:25 +0900 (f5e4ad2d1)
+++ test/command/suite/select/function/time/time_classify_day_of_week/valid.test    2018-07-03 17:22:24 +0900 (c8d6c0c86)
@@ -15,4 +15,4 @@ load --table Timestamps
 select Timestamps \
   --sortby _id \
   --limit -1 \
-  --output_columns '_key, time_classify_day_of_the_week(_key)'
+  --output_columns '_key, time_classify_day_of_week(_key)'
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20180703/7aafeb07/attachment-0001.htm 



More information about the Groonga-commit mailing list
Back to archive index