Boost.DateTime + wstring?

This is a discussion on Boost.DateTime + wstring? within the C++ Programming forums, part of the General Programming Boards category; I can't seem to find that they go hand-in-hand. Converting a simple wide string into a date seems impossible by ...

  1. #1
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,663

    Boost.DateTime + wstring?

    I can't seem to find that they go hand-in-hand.
    Converting a simple wide string into a date seems impossible by any easy means. std::string on the other hand would works just like so:
    Code:
          std::string s("2001-10-9"); //2001-October-09
          date d(from_simple_string(s));
    But this does not work for wide strings.
    Is there a better way to do this besides using confusing C/C++ date/time functionality and without having to convert the wide string to a narrow string?

    I expected the Boost library to be quality, yet it lacks wide support?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    I expected the Boost library to be quality, yet it lacks wide support?
    Boost is inhomogenous. Most libraries that concern themselves with strings support wide strings, some might not.

    Apparently, DateTime does so only partially. There seems to be wide streaming support for local_time, but date is rather lacking in that department.

    File a bug.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reading a language file (UTF-8 to wstring)
    By EVOEx in forum C++ Programming
    Replies: 2
    Last Post: 10-27-2008, 09:45 AM
  2. possible reasons wstring is out of sync with _Bx?
    By bling in forum C++ Programming
    Replies: 2
    Last Post: 09-20-2008, 01:30 PM
  3. making a wstring variable global scope
    By stanlvw in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2008, 02:25 PM
  4. Cross platform char to wstring.
    By Hulag in forum C++ Programming
    Replies: 2
    Last Post: 10-05-2006, 01:39 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21