FIND YOUR NEXT FEW LINES

Results for “date difference”

Small, practical examples. Search by task or narrow things down below.

275 snippets foundClear filters
Bash ScriptsFunction scope & composition

Return a value through a named output variable

Bash Scripts: A Bash nameref can update a caller-supplied variable without command substitution.

Bash Scripts✓ Tested
PowerShellCollections & objects

Select object properties

Create a smaller object with only the fields you need.

Select-Object✓ Tested
C#Data & dates

Serialize an object to JSON

Serialize a small anonymous C# object with System.Text.Json.

C#✓ Tested
jQueryText & attributes

Set an element attribute

Update an HTML link using jQuery attr.

jQuery✓ Tested
PythonStrings & dates

Split a string into words

Split text on whitespace, automatically treating repeated spaces, tabs, and line breaks as a single separator.

string✓ Tested
SQL ServerDates & text

Split delimited text with positions

Retain original order with STRING_SPLIT ordinals.

STRING_SPLIT✓ Tested
C#Data & dates

Sum integer values

Sum a C# sequence using LINQ.

C#✓ Tested
JavaNumbers & dates

Sum integer values

Reduce a Java integer stream to its sum.

Java✓ Tested
GitInspecting the working tree

Test whether tracked working files changed

Git: A quiet diff returns status one for differences, so handle it in a conditional.

Git✓ Tested
CFile positioning & lifecycle

Use an automatically removed temporary file

C: tmpfile creates a binary update stream whose file is removed when closed.

C✓ Tested
JavaNumbers & dates

Use an optional fallback

Use Optional.orElse to provide a default for a missing Java value.

Java✓ Tested