Browsing 7239 questions and answers with Jon Skeet
That's the correct time. Note the "Z" at the end, indicating UTC - 11:01:25 in UTC is 16:31:25 in Asia/Calcutta. If you want to represent "now" in your default time zone, use ZonedDateTime.now() instead. more 7/11/2016 11:13:21 AM
You can use the Chronology.range() method. For example: import java.time.*; import java.time.chrono.*; import java.time.temporal.*; public class Test { public static void main(String[] args) { Chronology hijrah =... more 7/11/2016 8:10:07 AM
The immediate problem is that after splitting your ActualReleaseDates string, there isn't an entry of "7/11/2016"... instead, there's an entry of " 7/11/2016"... note the space. But more fundamentally, just trimming the start of... more 7/11/2016 6:56:01 AM
If your list is already sorted, you can use a binary search: var index = dates.BinarySearch(start); // If the precise value isn't found, index will be the bitwise complement // of the first index *later* than the target, so we need to... more 7/10/2016 7:54:31 PM
They're equivalent. Basically, if you don't specify the type arguments to the method (i.e. the types in the <> in the method invocation), the compiler will try to use type inference to work out which type arguments you meant, based... more 7/9/2016 3:47:36 PM
Well don't say "I want it to use the current time"! That's what this is doing: OffsetTime.now(ZoneOffset.UTC) If you just want an OffsetDateTime from a LocalDate by providing a zero offset and midnight, you can use: OffsetDateTime... more 7/8/2016 3:20:55 PM
There's no formatting problem here - or at least, no bug in NSDateFormatter. It's behaving exactly as documented. From Unicode TR35-31, for 'Z' repeated 5 times: The ISO8601 extended format with hours, minutes and optional seconds... more 7/8/2016 1:53:59 PM
The compiler will cache the _noClosure delegate in a static field, and reuse it every time you call Init. The exact same instance can be reused every time. Compare that with _closure, which closes over a new instance of C() on each call... more 7/8/2016 1:26:32 PM
So how do I pass a string as method name to another method that accepts Func<string, string>? You don't - you create a Func<string, string> instead. You can do that with Delegate.CreateDelegate: var method =... more 7/8/2016 11:53:59 AM
An object doesn't have parameters - a method or a constructor does. In this case, basically there are two overloaded constructors. For example: public Rectangle(Point origin, int width, int height) { this.origin = origin; ... more 7/7/2016 10:18:00 PM