You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Farid Zaripov (JIRA)" <ji...@apache.org> on 2007/06/25 17:18:25 UTC

[jira] Created: (STDCXX-459) time_get::date_order() should return actually date order taken from locale

time_get::date_order() should return actually date order taken from locale
--------------------------------------------------------------------------

                 Key: STDCXX-459
                 URL: https://issues.apache.org/jira/browse/STDCXX-459
             Project: C++ Standard Library
          Issue Type: Improvement
          Components: 22. Localization
    Affects Versions: 4.1.2
         Environment: All
            Reporter: Farid Zaripov
            Priority: Minor


The current implementation of the time_get::date_order() always returns no_order. It should return date order  used by a locale facet (http://www.mail-archive.com/stdcxx-dev@incubator.apache.org/msg03734.html).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-459) time_get::date_order() should return actually date order taken from locale

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546853 ] 

Farid Zaripov commented on STDCXX-459:
--------------------------------------

ChangeLog:

  STDCXX-459
  * include/loc/_time_get.h (__rw_get_timepunct): Removed unnecessary declaration of the function.
(do_date_order): Function outlined and moved from here...
  * include/loc/_time_get.cc (do_date_order):... to here. Used __rw_get_dateorder() to obtain the dateorder value.
(__rw_get_dateorder): Added declaration of the new function.
(__rw_get_timepunct): Removed unnecessary _RWSTD_EXPORT attribute.
  * src/time_get.cpp (__rw_get_dateorder): Added new function to obtain the dateorder value.
  * src/time_put.cpp (__rw_get_timepunct): Removed unnecessary _RWSTD_EXPORT attribute.


> time_get::date_order() should return actually date order taken from locale
> --------------------------------------------------------------------------
>
>                 Key: STDCXX-459
>                 URL: https://issues.apache.org/jira/browse/STDCXX-459
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: 22. Localization
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4
>         Environment: All
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>            Priority: Minor
>             Fix For: 4.2.1
>
>         Attachments: stdcxx-459.patch
>
>
> The current implementation of the time_get::date_order() always returns no_order. It should return date order  used by a locale facet (http://www.mail-archive.com/stdcxx-dev@incubator.apache.org/msg03734.html).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-459) time_get::date_order() should return actually date order taken from locale

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12546778 ] 

Farid Zaripov commented on STDCXX-459:
--------------------------------------

Another option might be extend the struct __rw_time_t with d_order_off field and determine the dateorder value (or two values for narrow and wide characters) in __rw::__rw_get_timepunct().

> time_get::date_order() should return actually date order taken from locale
> --------------------------------------------------------------------------
>
>                 Key: STDCXX-459
>                 URL: https://issues.apache.org/jira/browse/STDCXX-459
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: 22. Localization
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4
>         Environment: All
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>            Priority: Minor
>             Fix For: 4.2.1
>
>         Attachments: stdcxx-459.patch
>
>
> The current implementation of the time_get::date_order() always returns no_order. It should return date order  used by a locale facet (http://www.mail-archive.com/stdcxx-dev@incubator.apache.org/msg03734.html).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (STDCXX-459) time_get::date_order() should return actually date order taken from locale

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov updated STDCXX-459:
---------------------------------

        Fix Version/s: 4.2.1
    Affects Version/s: 4.1.3
                       4.1.4

> time_get::date_order() should return actually date order taken from locale
> --------------------------------------------------------------------------
>
>                 Key: STDCXX-459
>                 URL: https://issues.apache.org/jira/browse/STDCXX-459
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: 22. Localization
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4
>         Environment: All
>            Reporter: Farid Zaripov
>            Priority: Minor
>             Fix For: 4.2.1
>
>
> The current implementation of the time_get::date_order() always returns no_order. It should return date order  used by a locale facet (http://www.mail-archive.com/stdcxx-dev@incubator.apache.org/msg03734.html).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (STDCXX-459) time_get::date_order() should return actually date order taken from locale

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov updated STDCXX-459:
---------------------------------

    Fix Version/s:     (was: 4.2.1)
                   4.3

Scheduled for 4.3.

> time_get::date_order() should return actually date order taken from locale
> --------------------------------------------------------------------------
>
>                 Key: STDCXX-459
>                 URL: https://issues.apache.org/jira/browse/STDCXX-459
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: 22. Localization
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4
>         Environment: All
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>            Priority: Minor
>             Fix For: 4.3
>
>         Attachments: stdcxx-459.patch
>
>
> The current implementation of the time_get::date_order() always returns no_order. It should return date order  used by a locale facet (http://www.mail-archive.com/stdcxx-dev@incubator.apache.org/msg03734.html).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (STDCXX-459) time_get::date_order() should return actually date order taken from locale

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov updated STDCXX-459:
---------------------------------

    Patch Info: [Patch Available]

> time_get::date_order() should return actually date order taken from locale
> --------------------------------------------------------------------------
>
>                 Key: STDCXX-459
>                 URL: https://issues.apache.org/jira/browse/STDCXX-459
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: 22. Localization
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4
>         Environment: All
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>            Priority: Minor
>             Fix For: 4.2.1
>
>         Attachments: stdcxx-459.patch
>
>
> The current implementation of the time_get::date_order() always returns no_order. It should return date order  used by a locale facet (http://www.mail-archive.com/stdcxx-dev@incubator.apache.org/msg03734.html).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


RE: [jira] Updated: (STDCXX-459) time_get::date_order() should return actually date order taken from locale

Posted by Farid Zaripov <Fa...@epam.com>.
> -----Original Message-----
> From: Travis Vitek [mailto:Travis.Vitek@roguewave.com] 
> Sent: Thursday, November 29, 2007 7:35 PM
> To: stdcxx-dev@incubator.apache.org
> Subject: RE: [jira] Updated: (STDCXX-459) 
> time_get::date_order() should return actually date order 
> taken from locale

> The standard says the following about do_date_order()
> 
>   dateorder do_date_order() const;
> 
>   1 Returns: An enumeration value indicating the preferred order
>   of components for those date formats that are composed of day,
>   month, and year. 244) Returns no_order if the date format
>   specified by 'x' contains other variable components (e.g. Julian
>   day, week number, week day).
> 
>   224) This function is intended as a convenience only, for common
>        formats, and may return no_order in valid locales.

  Thank's for the comment. I've forget to look into standard. :(

> I think that __rw_get_dateorder() needs to handle unexpected 
> date format specifiers [such as %j, %U, %V, %w] by returning 
> no_order.

  Yes. I think replacing "case '\0':" with "default:" will be enough?

> I also think you might also want to handle %h in 
> there as it is an alias for %b.
> 
> Might there be a compatibility issue here also?

  If the compiler doesn't optimizes the virtual call of the
do_date_order(),
the proposed patch, I think, is forward and backward source and binary
compatible
because the time_get<>::do_date_order() will be defined in the library
binary file.

  There might be a functional incompatibility if the user's code want's
the only
no_order values, but receive the value other than no_order.

Farid.

RE: [jira] Updated: (STDCXX-459) time_get::date_order() should return actually date order taken from locale

Posted by Travis Vitek <Tr...@roguewave.com>.
 
The standard says the following about do_date_order()

  dateorder do_date_order() const;

  1 Returns: An enumeration value indicating the preferred order
  of components for those date formats that are composed of day,
  month, and year. 244) Returns no_order if the date format
  specified by 'x' contains other variable components (e.g. Julian
  day, week number, week day).

  224) This function is intended as a convenience only, for common
       formats, and may return no_order in valid locales.

I think that __rw_get_dateorder() needs to handle unexpected date format
specifiers [such as %j, %U, %V, %w] by returning no_order. I also think
you might also want to handle %h in there as it is an alias for %b.

Might there be a compatibility issue here also?

Travis



>From: Farid Zaripov (JIRA) [mailto:jira@apache.org] 
>
>
>Farid Zaripov updated STDCXX-459:
>---------------------------------
>
>    Attachment: stdcxx-459.patch
>
>The proposed patch attached.
>
> time_get::date_order() should return actually date order 
> taken from locale
> 
>---------------------------------------------------------------
>>
>>                 Key: STDCXX-459
>>                 URL: https://issues.apache.org/jira/browse/STDCXX-459
>>             Project: C++ Standard Library
>>          Issue Type: Improvement
>>          Components: 22. Localization
>>    Affects Versions: 4.1.2, 4.1.3, 4.1.4
>>         Environment: All
>>            Reporter: Farid Zaripov
>>            Assignee: Farid Zaripov
>>            Priority: Minor
>>             Fix For: 4.2.1
>>
>>         Attachments: stdcxx-459.patch
>>
>>

[jira] Updated: (STDCXX-459) time_get::date_order() should return actually date order taken from locale

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov updated STDCXX-459:
---------------------------------

    Attachment: stdcxx-459.patch

The proposed patch attached.

> time_get::date_order() should return actually date order taken from locale
> --------------------------------------------------------------------------
>
>                 Key: STDCXX-459
>                 URL: https://issues.apache.org/jira/browse/STDCXX-459
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: 22. Localization
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4
>         Environment: All
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>            Priority: Minor
>             Fix For: 4.2.1
>
>         Attachments: stdcxx-459.patch
>
>
> The current implementation of the time_get::date_order() always returns no_order. It should return date order  used by a locale facet (http://www.mail-archive.com/stdcxx-dev@incubator.apache.org/msg03734.html).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (STDCXX-459) time_get::date_order() should return actually date order taken from locale

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov reassigned STDCXX-459:
------------------------------------

    Assignee: Farid Zaripov

> time_get::date_order() should return actually date order taken from locale
> --------------------------------------------------------------------------
>
>                 Key: STDCXX-459
>                 URL: https://issues.apache.org/jira/browse/STDCXX-459
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: 22. Localization
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4
>         Environment: All
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>            Priority: Minor
>             Fix For: 4.2.1
>
>
> The current implementation of the time_get::date_order() always returns no_order. It should return date order  used by a locale facet (http://www.mail-archive.com/stdcxx-dev@incubator.apache.org/msg03734.html).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-459) time_get::date_order() should return actually date order taken from locale

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12552871 ] 

Farid Zaripov commented on STDCXX-459:
--------------------------------------

1. This change is not necessary (and even more, it's incorrect, because __rw_get_timepunct() should be exported if the user instantiates the std::time_get<user_char, user_iterator>).

2. The __rw_get_dateorder() should also be _RWSTD_EXPORT to be accessible from std::time_get<user_char, user_iterator>. And this change is not a forward binary compatible.

3. I think yes. The outlining doesn't add's the new symbol in the library. The only what may change - it's a return value from the date_order(). But since the all possible returning values are valid (the user of the library shouldn't rely on the always returned no_order from date_order()) this change is safe.

> time_get::date_order() should return actually date order taken from locale
> --------------------------------------------------------------------------
>
>                 Key: STDCXX-459
>                 URL: https://issues.apache.org/jira/browse/STDCXX-459
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: 22. Localization
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4
>         Environment: All
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>            Priority: Minor
>             Fix For: 4.2.1
>
>         Attachments: stdcxx-459.patch
>
>
> The current implementation of the time_get::date_order() always returns no_order. It should return date order  used by a locale facet (http://www.mail-archive.com/stdcxx-dev@incubator.apache.org/msg03734.html).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (STDCXX-459) time_get::date_order() should return actually date order taken from locale

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov updated STDCXX-459:
---------------------------------

    Attachment: stdcxx-459.patch

The updated patch is attached.

> time_get::date_order() should return actually date order taken from locale
> --------------------------------------------------------------------------
>
>                 Key: STDCXX-459
>                 URL: https://issues.apache.org/jira/browse/STDCXX-459
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: 22. Localization
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4
>         Environment: All
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>            Priority: Minor
>             Fix For: 4.2.1
>
>         Attachments: stdcxx-459.patch, stdcxx-459.patch
>
>
> The current implementation of the time_get::date_order() always returns no_order. It should return date order  used by a locale facet (http://www.mail-archive.com/stdcxx-dev@incubator.apache.org/msg03734.html).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (STDCXX-459) time_get::date_order() should return actually date order taken from locale

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-459?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov updated STDCXX-459:
---------------------------------

    Attachment:     (was: stdcxx-459.patch)

> time_get::date_order() should return actually date order taken from locale
> --------------------------------------------------------------------------
>
>                 Key: STDCXX-459
>                 URL: https://issues.apache.org/jira/browse/STDCXX-459
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: 22. Localization
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4
>         Environment: All
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>            Priority: Minor
>             Fix For: 4.2.1
>
>         Attachments: stdcxx-459.patch
>
>
> The current implementation of the time_get::date_order() always returns no_order. It should return date order  used by a locale facet (http://www.mail-archive.com/stdcxx-dev@incubator.apache.org/msg03734.html).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-459) time_get::date_order() should return actually date order taken from locale

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12551846 ] 

Martin Sebor commented on STDCXX-459:
-------------------------------------

The patch looks good to me in general but I have a few compatibility concerns with it:

1. It removes _RWSTD_EXPORT from __rw::__rw_get_timepunct(). Is this forward binary compatible on Windows?

2. It adds a new function, __rw::__rw_get_dateorder(). Is this forward binary compatible?

3. It outlines the virtual member function time_get::do_date_order(). Is this binary compatible?

> time_get::date_order() should return actually date order taken from locale
> --------------------------------------------------------------------------
>
>                 Key: STDCXX-459
>                 URL: https://issues.apache.org/jira/browse/STDCXX-459
>             Project: C++ Standard Library
>          Issue Type: Improvement
>          Components: 22. Localization
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4
>         Environment: All
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>            Priority: Minor
>             Fix For: 4.2.1
>
>         Attachments: stdcxx-459.patch
>
>
> The current implementation of the time_get::date_order() always returns no_order. It should return date order  used by a locale facet (http://www.mail-archive.com/stdcxx-dev@incubator.apache.org/msg03734.html).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.