Hi all...
In the following example, i would to add the "diff" value (in
days) to a certain date (or the today's date "auj") >>
import std.stdio;
import std.datetime;
import core.time : Duration;
void main()
{
auto deb = DateTime(2019, 9, 5);
auto auj = Clock.currTime();
writeln("Aujourd'
On Thursday, 24 October 2019 at 16:21:47 UTC, welkam wrote:
On Thursday, 24 October 2019 at 15:27:05 UTC, Mil58 wrote:
[...]
void main() {
File("data.txt", "r+")
.byLineCopy()
.array()
.each!writeln;
}
byLineCopy removes the new lines. If in the future you would
n
Hi all It's me again ;-)
(because you're very strong in Dlang, here...)
In want a result as i write in a comment, with remove unwanted
'\r' >>
import std.stdio;
import std.file;
import std.conv;
import std.process : executeShell;
/* Content of 'values.txt' >>
abcd
1234
03b52h
*/
void
On Thursday, 24 October 2019 at 12:01:21 UTC, Adam D. Ruppe wrote:
On Thursday, 24 October 2019 at 11:50:04 UTC, Mil58 wrote:
[...]
Try this:
Duration diff = cast(DateTime) auj - deb;
writeln("Diff : ", diff.total!"days");
[...]
Awsome ! Thank you for your quick reply...
Both lines work pe
Hi All...
I am desperate for the answer to the following problem:
to obtain the difference between the date of today and an older
date (results in days...)
See my script below, where I would like to do:
"date of today" (var: auj) - "an older date" (var: deb) = xx days
import std.stdio;
import
On Thursday, 17 October 2019 at 14:50:23 UTC, Paul Backus wrote:
On Thursday, 17 October 2019 at 14:45:24 UTC, Mil58 wrote:
Hi all...
Does exist (or not?) a way to create array with several types
(as in Python)
(example) :
xxx[4] myTab = [180, "John", false, -0.771];
Of course, this is doi
Hi all...
Does exist (or not?) a way to create array with several types (as
in Python)
(example) :
xxx[4] myTab = [180, "John", false, -0.771];
Of course, this is doing an Error ;-) Thanks.