Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
int Fecha::obtenerAnioActual(){ time_t t = time(0); tm* tiempoLocal = localtime(&t); return 1900 + tiempoLocal->tm_year; // tm_year es el número de años desde 1900 } /* primera linea; obtiene el tiempo actual en segundos desde el 1 de enero de 1970. segunda linea; convierte este tiempo en una estructura tm que contiene información de fecha y hora desglosada. tercer linea; obtiene el año actual, ya que tm_year representa el número de años transcurridos desde 1900. */
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)